Dror,

The (correct) short answer is that you
need to encode your queries in UTF-8,
as required by the translation interface.

Longer answer:

The reason why you did not obtain the expected
response is because your query did not use the
required UTF-8 character encoding.

Your query used a non-Unicode
character encoding for Hebrew; e.g.,
either ISO-8859-8 or Windows-1255 encoding.

The values of the characters in your query
were (in hexadecimal notation):
F9, EC, E5, ED.

The same query in UTF-8 encoding has
these hexadecimal character value pairs:
D7 A9, D7 9C, D7 95, D7 9D.

Click the following link to submit the query
with that encoding, and you will get the
expected response:

http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%D7%A9%D7%9C%D7%95%D7%9D&langpair=iw%7Cen

The translation succeeds.
The response contains:
... {"translatedText":"Hello"} ...

For more information, see references
such as this one (among others):

http://www.qsm.co.il/NewHebrew/ab0.htm

In the table on that page, you can
find the correspondences between the
ISO 8859-8 values  (F9, EC, E5, and ED)
vs. the UTF-8 values for your query
(D7 A9, D7 9C, D7 95, and D7 9D).

(Note: I'm not the author of that page.
I suggest it as a starting point, but
you will probably want to search for
other sources of further information
about UTF-8 character encoding.)

-- omr

--

You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.


Reply via email to