Forum Moderators: coopster

Message Too Old, No Replies

Strange characters with the API of Google.

         

romzinho2k7

1:45 pm on Jan 2, 2009 (gmt 0)

10+ Year Member



Hello, everyone. Happy new year.

I have great doubt about special characters in google language.

I'm trying to translate hello world to French, is that if I put such <p>"hello world"</p> it shows strange characters.

Example:
{"responseData": {"translatedText":"\u003cp\u003e \u0026quot;Bonjour à tous\u0026quot; \u003c/p\u003e"}, "responseDetails": null, "responseStatus": 200}

Ie \u003cp\u003e was to be <p>.

Does anyone have any idea how I can do to put these characters normal?

Thanks in advance.

How can I convert it with PHP?

Sorry my english.

eelixduppy

3:39 pm on Jan 6, 2009 (gmt 0)



You figure this out yet? Not sure what is happening here.

penders

4:37 pm on Jan 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Looks like some kind of unicode string... not sure if PHP's unicode_encode() [uk3.php.net] will work here, or check the user comments on that page.