houssambazzi / microsoft-translator-java-api

Automatically exported from code.google.com/p/microsoft-translator-java-api
0 stars 0 forks source link

Bug on method Translate.execute #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
An exception is thrown when the text to translate starts with the " character 
in the method "Translate.execute".
Example: Translate.execute("/"Test", inputLanguage, outputLanguage);
Error: There was an error deserializing the object of type System.String. 
Unexpected end of file. Following elements are not closed: root.
Version: 0.5

Original issue reported on code.google.com by maffei...@gmail.com on 15 Jan 2012 at 12:21

GoogleCodeExporter commented 8 years ago
Looks like Bing translator Ajax API (GET queries) fails when text contain a 
symbols like line breaks and some unicode symbols and some other even the text 
is urlencoded. I think it is related to  Issue #39 on GitHub. 
I've patched library to use HTTP API (POST queries) for TranslateArray method. 
It solves such issues. 
There are few new methods in the 
/src/main/java/com/memetix/mst/MicrosoftTranslatorAPI.java and 
/src/main/java/com/memetix/mst/translate/Translate.java
Look the attach. Would be cool if author merge this or even migrate entire 
library to HTTP API.

Original comment by artswan....@gmail.com on 29 Jan 2013 at 1:56

Attachments: