Google translate latin characters (�����) problem

Hi All,
I took a job where I am asked to write a J2ME translator which uses a back-end servlet to get the translation from google translate. Well it is almost done, however I get translation differences depending, I think, on which platform, tomcat, or java vm is used to run the servlet. I cannot really figure out why this happens.
result on my notebook (xp sp2, tomcat 5.5.20, jdk 1.5.0_10):
*** Request ***
Request Path: /translate_t
Request Query: hl=en&ie=UTF8&text=how+much+is+this&langpair=en|it
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: www.google.com
*** Response ***
Status Line: HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
Content-Language: en
Server: TWS/0.9
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
Date: Wed, 25 Jul 2007 21:55:31 GMT
en_US
HERE I GET THE RIGHT TRANSLATION : quanto � questo
result on the provider's server (not sure but maybe linux, tomcat 5.5.xx, jdk 1.5.0_xx, where xx means versions older then mine):
*** Request ***
Request Path: /translate_t
Request Query: hl=en&ie=UTF8&text=how+much+is+this&langpair=en|it
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: www.google.com
*** Response ***
Status Line: HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
Content-Language: en
Server: TWS/0.9
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
Date: Wed, 25 Jul 2007 21:58:48 GMT
en_US
HERE I GET A WRONG TRANSLATION : quanto ��� questo
Has someone out there ever faced and solved such or similar problems?
Thanks,
Regards,
Silvio.

Hi hunter,
thx for your reply.
This is what I do :
String url="http://www.google.com/translate_t?hl=en&ie="+charset+"&text="+text+"&langpair="+googlelang;
HttpClient client = new HttpClient();
client.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
HttpMethod method = null;
method = new GetMethod(url);
method.setFollowRedirects(true);
String responseBody = null;
try{
client.executeMethod(method);
// gets the response from google as an html page
BufferedReader in = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream()));
String input = null;
StringBuffer sb = new StringBuffer("");
while ((input = in.readLine())!=null) {
     sb.append(input);
// here I have the html page; already here I have the wrong or right translation, quite strange no?
responseBody = sb.toString();
} catch (Exception e) {
e.printStackTrace();
After simply I parse the html extracting the translated string.
Any other suggestions?
Thx again, silvio

Similar Messages

  • With Firefox 8, "google translate" translate but doesn't speak (it speaks with IE)

    Hello,
    Few days ago I downloaded Firefox 8. Today I try google translate (http://translate.google.fr/): it translates without any problem but impossible to have a sound. I verified with Internet Explorer, and there I can listen to google translate, so the problem comes from Firefox.
    Thanks to solve this problem, because FF is very good and I need google translate too !

    I discovered the issue was dom.ipc.plugins.enabled was set to false to prevent firefox from spawning an additional exe for plugins. With this setting set to true, the problem is resolved.
    I guess the programmers are in love with the concept of the plugin container, so they quit developing the functionality without it. I would bet their response would be "use the container for the best user experience". Bullocks. They should know IPC is harder to keep straight than shared memory.

  • Since ios 7 I can no longer use google translate in safari.  I use this page every day to translate friends Facebook entries.  Anyone else having this problem?  And is there a fix?

    Since ios 7 I can no longer use google translate in safari.  I use this page every day to translate friends Facebook entries.  Anyone else having this problem?  And is there a fix?  Currently it is in my bookmark bar beside Facebook and worked fine until I upgraded top ios 7 a few days ago.

    Go to your Google translate bookmark.
    Type in a word then tap whatever language.
    Make a select for the language to be translated to by tapping Dutch (or whatever language you see in the box all the way to the right. You should see a language menu.

  • I am using photoshop cc 2014.2 And when I use save for Web it gives me a dialog box that says it is using Latin characters I've never seen this before. Does anyone have an answer for this problem or do I need to go back to the older version of Photoshop.

    I'm using Photoshop cc 2014.21 I you save for Web and dialog box comes up that says that Photoshop is using Latin characters and that servers cannot recognize Latin characters in webpages and you may have trouble viewing these pages does anyone have an answer for this problem?

    What Firefox version is currently installed on the computer?
    You can find the full version of the current current Firefox release (37.0.2) in all languages and all operating systems here:
    *https://www.mozilla.org/en-US/firefox/all/
    If you have a very old Firefox version then you could consider to uninstall that version to clean up existing registry keys (especial the uninstall key).
    Make sure NOT to remove "personal data" when you uninstall Firefox, because that will remove all profile folders and you lose personal data like bookmarks and passwords including data in profiles created by other Firefox versions.
    Check the Firefox program folder and remove the Firefox program folder if there are still files left in it.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure NOT to remove personal data when you uninstall Firefox as that will remove all Firefox profile folders and you lose your personal data.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • Problem in code with Google Translate

    hi
    i have Problem in code with Google Translate
    Imports Google.API.Translate.Language
    Imports Google.API.Translate
    Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim text As String = "hello"
    Dim tr As New TranslateClient("https://translate.google.com")
    Dim xx As String = tr.Translate(text, Language.English, Language.French, Google.API.Translate.TranslateFormat.Text)
    MsgBox(xx)
    End Sub
    End Class
    All things good but it shows an error in the second line

    For assistance with Google API's contact Google.
    La vida loca

  • Non- Latin characters not available following iCloud problem

    Following help from HKQ recovering my Reminders (it turned out there was a problem with iCloud), my non-Latin characters (and the little globe icon for them have just vanished !) This must have happened during the reset or switching on iCloud. I need this really urgently to send emails to people. Please help,
    thank you !

    it's ok I found and added foreign keyboard.  But the numbers give $ instead of £ even though it says it's  on UK English,

  • Character display problem latin characters

    For some reason old fonts show latin characters when i type "o/" and "l/". The problem seems confined to old fonts (at least Geneva; Monaco; New York), so I guess it is a bug?

    I think after all it is a problem with the either:
    a. OS installer, which should really try to delete fonts which are duplicated by new system fonts
    b. OS which should give precedence to new system fonts over old system fonts where there are two the same, especially when the system fonts are in /System/Library/Fonts and the old ones are in /Library/Fonts
    The major annoyance is that this problem appeared with Leopard and took me hours of searching to figure out its origin - when you don't know if it is a character entry problem (which I thought) or a character display problem (which it turned out to be). In the end the fix was simple - delete the superceded fonts.

  • Problem with Latin Characters while transferring to the file

    Hi,
    I want to transfer the data to the file. But the problem i m facing is latin characters get converted to unwanted characters.
    If i use FM 'SCP_REPLACE_STRANGE_CHARS', it converts latin to english.
    But i want latin to be latin itself.
    Please help.

    hi..
    this has more to do with the conceppt of codepage of the system...that u r using..
    in some cases the development system is unable to recognise the local characters...and hence it prints junc characters....but wen u move the same to higher system...u can find the desired characters....
    Also try one thing ..log in in local (Latin Language ) and upload...even if it does not come in devlopment system...it will come in higher systems...
    Hope the above works...Reward points..if helpful...
    Edited by: Rudra Prasanna Mohapatra on Jul 3, 2008 1:27 PM

  • Problems with google translate

    Using Safari 4.0.4 in Mac OSX 10.6.2, does not work in google translate the option called "Listen to this Translation". Appreciate the help.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Problem latin characters

    Hi!
    We are actually working with Flex and we have some problems
    to deal with latin characters like áéíóú
    and ñ. Static texts are correctly shown, but dynamic texts
    not. These dynamic texts come from the database and are mapped to
    actionscript objects from java objects. The problem is that latin
    characters are replaced with white squares.
    We have checked the content of the java objects, printing
    their content and the texts keep the original charset, so, we think
    the problem is in the mapping to the actionscript objects.
    We are using RemoteObject and the message protocol amf. We
    have looked for configuration directives to change the charset but
    we didn´t success :(
    I know it's a very specific problem, but it you could give me
    any clue to solve this I would be very pleased.
    Thanks in advance! (Sorry for my english, I hope you could
    understand everything I wrote).

    I think after all it is a problem with the either:
    a. OS installer, which should really try to delete fonts which are duplicated by new system fonts
    b. OS which should give precedence to new system fonts over old system fonts where there are two the same, especially when the system fonts are in /System/Library/Fonts and the old ones are in /Library/Fonts
    The major annoyance is that this problem appeared with Leopard and took me hours of searching to figure out its origin - when you don't know if it is a character entry problem (which I thought) or a character display problem (which it turned out to be). In the end the fix was simple - delete the superceded fonts.

  • Problem while inserting Latin characters

    Hi All,
    Version details
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionLanguage :
    SQL> show parameter nls_lang
    NAME                                 TYPE        VALUE
    nls_language                         string      AMERICANCurrently,we are facing problem in inserting Latin characters such as 'ʬ '
    We are receiving these characters from another DB via DB Link .What parameters should I change in my DB to accept those Latin characters.
    Please suggest an approach or charset that'll allow my Db to accept both English and Latin characters.

    Sorry for not providing exact information.But please consider the example character that I've mentioned 'ʬ'.
    While I'm trying to insert the above character in my Db with below nls_parameters
    SQL>  select parameter||'--> '||value from nls_database_parameters;
    PARAMETER||'-->'||VALUE
    NLS_LANGUAGE--> AMERICAN
    NLS_TERRITORY--> AMERICA
    NLS_CURRENCY--> $
    NLS_ISO_CURRENCY--> AMERICA
    NLS_NUMERIC_CHARACTERS--> .,
    NLS_CHARACTERSET--> UTF8
    NLS_CALENDAR--> GREGORIAN
    NLS_DATE_FORMAT--> DD-MON-RR
    NLS_DATE_LANGUAGE--> AMERICAN
    NLS_SORT--> BINARY
    NLS_TIME_FORMAT--> HH.MI.SSXFF AM
    PARAMETER||'-->'||VALUE
    NLS_TIMESTAMP_FORMAT--> DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT--> HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT--> DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY--> $
    NLS_COMP--> BINARY
    NLS_LENGTH_SEMANTICS--> BYTE
    NLS_NCHAR_CONV_EXCP--> FALSE
    NLS_NCHAR_CHARACTERSET--> AL16UTF16
    NLS_RDBMS_VERSION--> 10.2.0.4.0
    20 rows selected.My Table
    create table r_dummy (a varchar2(4000))
    /Insert Script
    insert into r_dummy values('ʬ' )But after inserting
    When I retrieve the inserted data
    SQL> select *
      2  from r_dummy;
    A
    ?Please lemme know how to insert the above character.

  • Script or font problems with google translate to/from Thai in Safari

    I have a strange issue with the new google translate to Thai when I go to this page for instance:
    http://translate.google.com/translate_t?text=hellow,how+are+youtoday?&langpair=en%7Cth#en
    that the thai script just comes out as a bunch of boxes, except for the punctuation. This works fine in Firefox, works with other alternate scripts (Korean, Arabic, Japanese, Chinese, Korean, Persian) and I can type Thai script into other google search areas with the Thai keyboard, so I have the Thai font in general installed.
    It seems to be fixed if I change the Fixed Width Font in the Safari Appearance Preferences to anything but a fixed width font, e.g. Lucida Grande since non of the fixed width fonts seem able to handle Unicode for some reason. Why can Firefox understand this and put in Thai instead, but Safari can't?
    Using Lucida Grande for the fixed width font is a fine interim solution, but it is not fixed width so other things will come out strangely spaced.

    I have a strange issue with the new google translate to Thai when I go to this page for instance:
    http://translate.google.com/translate_t?text=hellow,how+are+youtoday?&langpair=en%7Cth#en
    that the thai script just comes out as a bunch of boxes, except for the punctuation. This works fine in Firefox, works with other alternate scripts (Korean, Arabic, Japanese, Chinese, Korean, Persian) and I can type Thai script into other google search areas with the Thai keyboard, so I have the Thai font in general installed.
    It seems to be fixed if I change the Fixed Width Font in the Safari Appearance Preferences to anything but a fixed width font, e.g. Lucida Grande since non of the fixed width fonts seem able to handle Unicode for some reason. Why can Firefox understand this and put in Thai instead, but Safari can't?
    Using Lucida Grande for the fixed width font is a fine interim solution, but it is not fixed width so other things will come out strangely spaced.

  • Question about Google Translator with flags for BC website

    Hello
    I am looking for a solution for my website , I am using Business Catalyst as platform to create the website.  I am looking for simple one code/plugin/HTML solution which I can copy paste in the website for the translation. I want to put google translator with flags on my website in the top right hand side. I want to translate my website in 9 languages and want to put 9 country flags on the top right hand side,  which translate languages on click event on "same page" , I want the translation must take place at the same page after clicking on the flag. How-ever I successfully integrated google translate with dropdown option but want to integrate google flag translations on my website.
    Please let me know what can be done here.
    Regards'

    Don't use google translate, it's the worst user experience you can ever give a user and makes the site look like it was designed by a 12 year old with a grammer problem. Machine translation is no were near anything good for a production website currently and even more so for non latin languages like Japanese, Chinese, Korean etc.
    Case and point, throw a few lines of text into google translate, then reverse the translation back to english, you'll see my point.

  • Non latin characters in Safari search

    In Safari 6 the search and URL fields are combined. That's fine, except...
    We can no longer search using non-Latin characters, because the field accepts only Latin characters. I was trying to search for a Japanese term, and when I switch to Hiragana input and move to the search field, the input switches back to English.
    What's the workaround??

    The problem has gone away. I suspect it was a problem with corrupted prefs. I trashed the Safari prefs and rebooted to clear another problem and no longer have the problem with search using Japanese characters.
    FWIW, the problem I had when I trashed the prefs was with trying to mail a Safari page. I ran in to this originally a week or two ago and called Apple who told me to delete the Safari prefs and reboot. (Actually they gave an alternate procedure to try first, but I didn't bother.) That appears to be a recurrent problem and since there was no hesitation on the solution when I called I would guess that it will be fixed in an early patch. I had already tried trashing the mail prefs since that's where the problem actually appeared (an extra copy of Mail would open, and then hang) but it was in fact the Safari prefs that was causing the problem. I've had to do the delete-and-reboot routine every few days. Not sure why the reboot is required, but it obviously is since just quitting Safari or even logging out doesn't fix it.

  • We cannot type Polish (non-latin) characters in WebDynpro applications

    We cannot type Polish (non-latin) characters in WebDynpro application (in runtime) because 'Browser Help Shortcuts' are fired.
    To type a polish character in polish keyboard you need to press AltGr + letter (ie. AltGr + a/c/e/s/o/l/z/x/n). To type an uppercase polish character you need to press AltGr + Shift + letter. This comination is in fact the same as pressing Alt + Ctrl + Shift + letter (because AltGr produces Alt + Ctrl) and it fires some of 'Browser Help Shortcuts'. For example AltGr + Shift + O should produce a letter O with a dash on it's top but instead it fires 'Show nesting of HTML containers'.
    We tried to turn off sap-wd-lightspeed, but then other key combinations are reserved for u2018Browser Help Shortcutsu2019.
    We need to be able to use AltGr + Shift + a/c/e/s/o/l/z/x/n in runtime.
    Product: SAP NW 7.11 SP04
    WebDynpro for Java
    I hope there is a somewhere a hidden parameter that solves our problem Maybe we're in some kind of debug mode?
    Thanks for your help!!

    The funny thing is that bold font [when message unread in message list] shows OK, ie in greek, but when i click on unread message, it is assumed to have been read, so it changes over to medium [non bold] and the encoding changes as well into the one that is not greek and thus unreadable.  In ~/.sylpheed/sylpheedrc the fonts are:
    widget_font=
    message_font=-microsoft-sylfaenarm-medium-r-normal-*-*-160-*-*-p-*-iso8859-7
    normal_font=-monotype-arial-medium-r-normal-*-12-*-*-*-*-*-iso8859-7
    bold_font=-monotype-arial-bold-r-normal-*-12-*-*-*-*-*-iso8859-7
    small_font=-monotype-arial-medium-r-normal-*-12-*-*-*-*-*-iso8859-7
    In /etc/gtk, for gtk1.2 apps the file refering to greek encoding [el] seems to be fine [exactly the same as in slackware 9.1].

Maybe you are looking for

  • IWeb error messages -- can't publish large site after upgrade.

    I just upgraded to iLife 09 and all of my websites showed up red in the new iWeb - indicating that they needed to be published. I hadn't changed any of them since the upgrade but I figured it was part of the upgrade to republish all of them. Whenever

  • Fonts in smart froms

    how do u change fonts in smart forms?

  • Preview 5.5 won't follow links in pdf

    I have a collection of pdf files that have links to one another embedded in them,. Collectively they form a manual that you can jump around in. In 10.6 when you clicked a link while viewing in Preview it followed the link. In Lion (10.7) it gives a p

  • IS 10.x Flash compatible with beta Firefox 4.x ?

    Hello, Would like to know if current flash engine is good to go with beta 4.x Firefox?  Not running the beta yet, using 3.6.9 and it still has an " Potentially vulnerable plugins:" message always shows up in the browser for 3.6.9 for the Acrobat plug

  • I do not always have internet access.

    How can I get a copy of Illustrator to install on my computer so I am not dependent on the cloud? I  seriously do not like the idea that I am operating on the internet instead of on my hard drive. I often need to use my software in places where there