Hi Yishay,
Thanks for your inquiry. Your “test skn.txt” file seems to be encoded with following:
Code Page: 1252
Charset Label: Windows-1252
Encoding Name: Western European (Windows)
And you can change encoding of this file to Code Page: 862 (Charset Label:DOS-862) by using the following code (see attached encoded .txt file):
AsposeApp.AppSID = “”;
AsposeApp.AppKey = "";
string xml = @"
txt
Encoding_Updated.txt
DOS-862
";
//build URI
string strURI = "http://api.aspose.com/v1.1/words/test skn.txt/SaveAs";
//sign URI
string signedURI = Utils.Sign(strURI);
Utils.ProcessCommand(signedURI, "POST", xml, "xml");
//build URI
strURI = "http://api.aspose.com/v1.1/storage/file/Encoding_Updated.txt";
//sign URI
signedURI = Utils.Sign(strURI);
Stream responseStream = Utils.ProcessCommand(signedURI, "GET");
using (Stream fileStream = System.IO.File.OpenWrite(@"D:\Temp\Encoding_Updated.txt"))
{
Utils.CopyStream(responseStream, fileStream);
}
responseStream.Close();
Please also see saveAs (Controller resource). Hope, this helps.
Best regards,
Hi Awais,
Great answer! I really appreciate the details.
There is only one problem left, I want to convert the document both to UTF-8 and to DOS-862. Is that possible?
Many thanks,
Yishay
Hi Awais,
Just tried sending:
txttest skn_converted.textDOS-862
But I got back the attached file (testing (4).text).
It doesn’t seem to work, we should have got text like:
תומוק
Thanks,
Yishay
Hi Yishay,
Thanks for the additional information. In your case, you don’t need to use TextSaveOptions. Instead, you could simply use the following request to meet this requirement:
http://api.aspose.com/v1.1/words/testskn.txt?format=txt&loadEncoding=DOS-862
But unfortunately, the “loadEncoding” parameter is currently not working as expected. Your thread has been linked to appropriate issue (WORDSCLOUD-67) and you will be notified as soon as this issue is resolved. Sorry for the inconvenience.
Best regards,
Hi Awais,
I also tried running two calls the first with
UTF-8
and the second with
DOS-862
And still didn’t work (file attached).
I also tried DOS-862 first and than UTF-8.
Is there anything else that we can do?
Thanks,
Yishay
Hi Yishay,
Awais:
Thanks for the additional information. In your case, you don’t need to use TextSaveOptions. Instead, you could simply use the following request to meet this requirement:
http://api.aspose.com/v1.1/words/testskn.txt?format=txt&loadEncoding=DOS-862
)
But unfortunately, the “loadEncoding” parameter is currently not working as expected. Your thread has been linked to appropriate issue (WORDSCLOUD-67) and you will be notified as soon as this issue is resolved. Sorry for the inconvenience.
We will inform you via this thread as soon as the issue (WORDSCLOUD-67) is resolved. We apologize for any inconvenience.
Best regards,
Hi Awais,
Totally understood this.
I just wanted to understand if there is some way to go around the problem while we wait for the dev team to solve it.
Thanks,
Yishay
Hi Yishay,
Thanks for your inquiry. This issue is currently pending for analysis and is in the queue. Once the issue is analyzed by our product team, we may then be able to provide you a workaround while you wait for a fix to come out. We apologize for your inconvenience.
Best regards,
The issues you have found earlier (filed as WORDSCLOUD-67) have been fixed in this Aspose.Words for Cloud update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
Great news!
Just checked it and it works.
Many thanks,
Yishay
Hi Awais,
Bad news.
You have a bug with algorithm you use for encoding.
The following sentence:
01020100104000007.00000000000.00 ˜ˆ…— ‰–…— š˜ƒ‡„… Ž"Ž 8 ˜ˆ…— ‡…ƒ‰— š…˜Œ ,š…‘”˜Ž š…‰˜ˆ‰…Œ š‡šŽ ‹… ‰…ˆ˜ ‰˜…†€ š…–‰‡Ž š‰š‡š Ž"‘ 20 ƒ’ „…‚… Ž"‘ 10-20 ‡…˜ 20- …ˆ š…˜…‚‡
was translated in Aspose to:
בחורב 20-ב ןוטב תורוגח10-2001020100104000007.00000000000.00 רטוקב םיצוק תרדחהו מ"מ 8 רטוקב חודיק תוברל ,תוספרמב תונירטיול תחתמ ןכו םיבוטר םירוזאב תוציחמ תיתחתב מ"ס 20 דע הבוגבו מ"ס
while actually it should have been (I used notepad++ to get this one):
01020100104000007.00000000000.00 רטוקב םיצוק תרדחהו מ"מ 8 רטוקב חודיק תוברל ,תוספרמב תונירטיול תחתמ ןכו םיבוטר םירוזאב תוציחמ תיתחתב מ"ס 20 דע הבוגבו מ"ס 10-20 בחורב 20-ב ןוטב תורוגח
This is very bad, because it means we cannot use the functionality at all.
Regards,
Yishay
Hi Awais,
I think the issue is with numbers in cases where the number is followed by - or / (maybe other characters as well) and than another number, some examples:
1/2
3-30
This might also be the case with english letters embedded in the text.
I hope this will help you help us.
Thanks,
Yishay
This also happens when there are English letters embedded in the text (even one letter is enough, no need for punctuation like - or .
Hi Yishay,
To ensure a timely and accurate response, please attach the following resources here for testing:
- Your input document
- Aspose.Words generated output document showing the undesired behavior
- Your expected document showing the correct output. You may create expected document using Microsoft Word etc.
As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.
Best regards,
Hi Awais,
I just copied pasted the information I already wrote you in my previous comment into 3 files.
Yishay
Hi Yishay,
Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSCLOUD-78. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.
Best regards,
Hi Awais,
We are waiting patiently for this bug to be fixed for almost a year (my first post was on 1st of July 2015).
Are you going to solve this issue anytime soon?
Regards,
Yishay
Hi Awais,
Any news regarding that ETA?
thanks,
Yishay