UTF-8
I had been having problems keying in non-English characters over the last 2 weeks or so.
It all started with X-Japan’s song post, which refused to show the Japanese characters, no matter how I tried. The Jap text kept showing up as ??? when published.
Tonight, as I troubleshoot Petrina Kow’s photo upload issue, I decided to work on this one as well, and get it over and done with.
After some research, including the one in codex@wordpress, 2 things had to be done.
First, to change the wp-config.php file, via this suggestion. This went against what Wordpress suggested, but I guess it’s the fastest way to solve the problem.
[edit 19th June 2008, 1230hrs]
I resumed troubleshooting the issue of not able to use the 2 lines in the wp-config.php file (to follow back Wordpress code structure). Tried this method, but it didn’t work. Then I read up the idea of converting the encoding of the SQL database in a text editor. It’s kinda manual, but it works. And I proceeded to download a backup of the entire content.
What I realised then, while converting the whole database (about 1.87MB at this time) in the text editor, is that the content had been changed into UTF-8 unicode instead of UTF-8 general, and that created problems. So using Notepad to copy, and UltraEdit to convert everything from ‘UTF-8 Unicode’ to ‘UTF-8′ (Unicode Editing) (there’s such an option in UltraEdit), all the garbage went away.
Then I popped the entire database back in, by importing it via phpMyAdmin, and then enabled the 2 lines commented in wp-config.php once again. Problem solved.
[/edit]
Then, to change all the charset in the database, from latin1_general_ci, to utf8_general_ci. The best way there, is to use the UTF-8 Database Converter by g30rg3_x.
(Note: this doesn’t seem to change the encoding format of the blog content from latin1 to utf-8) The plugin saved all the manual editing headaches via phpMyAdmin. And now, all the Chinese and Japanese words etc, are back in full display.
Meanwhile, other things are still on hold: flash song player, baking lessons posts, and the recent trip up Singapore Flyer.
Leave a Reply