Problem with ajax and posting non-latin characters

Posted by jason on Stack Overflow See other posts from Stack Overflow or by jason
Published on 2010-05-01T17:01:25Z Indexed on 2010/05/01 17:07 UTC
Read the original article Hit count: 320

Filed under:
|
|

Posting non-latin based languages with ajax + jquery doesn't save to mysql the correct text.

What I have done is this:

  • I am getting multiple translated words from Google's translation api.
  • The ajax request is showing the correct translations for all languages.
  • But when i try and insert this into the db it shows up in php my admin as garbled text
  • I added AddDefaultCharset UTF-8 to .htaccess file on the root.
  • I tried setting the header in php to utf-8 and this did not work.
  • I have tried adding a contentType to ajax setup but this didn't work also.

Any suggestions appreciated.

jason

© Stack Overflow or respective owner

Related posts about utf-8

Related posts about translation