Storing Japanese text in latin1_swedish_ci collation table
Posted by: Christopher Mosses
Date: June 30, 2008 10:50PM

I have a Japanese website that stores Japanese text from an HTML form in a MySQL table that uses latin1_swedish_ci collation. When I browse the data with phpMyAdmin, the text is garbled. When displaying the text in a browser through a PHP page with
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
in the header, the browser shows the text correctly.

It was the previous developer who thought it was OK to store Japanese characters in latin1_swedish_ci collation tables. Converting the collation is now not an option.

I am creating a PHP webservice that should return texts as unicode strings, but the text is coming out garbled, like when viewing it in phpMyAdmin. Is there a way I can convert the garbled text to unicode? Please help. Both MySQL tips and PHP tips are welcome. Thanks a lot.

Options: ReplyQuote

Written By
Storing Japanese text in latin1_swedish_ci collation table
June 30, 2008 10:50PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.