[Skip to the main content] Welcome to Daigo’s Daily Digital Diorama. I blog about Baseball, Judo, Jazz, Linux, Design and on being a dad.

  • Get Firefox!

I solved the turncated Japanese problem!

It was frustrating as heck, I tell you, this MySQL thing. I have since learned that I can use iconv utility to convert the file like:

iconv -f utf-8 -t windows-1252 foo.sql > bar.sql

But that was not the problem. I’ve also learned that I can use mysqldump with option –default-character-set= to dump data in different encoding. Like this:

mysqldump --add-drop-table --default-character-set=latin1
-u [username] -p [database] > [backup_file]

I’ve also figured out how to restore mysql from dumped file without using phpmyadmin. I guess at this point of troubleshooting, cut as much middleman as possible. here is the command:

mysql -u [username] -p -h [hostname] [DBname] < dumped.sql

After many of frustrating upgrade attempts, here is how I solved the problem. I first dump the data using –default-character-set=latin1 option, then without conversion or anytyhing I put that back on to the new server. So, apperantly the database thing whatis in it is latin1 encoding. But the interface is consistent, somehow it works. I sorta know why this works but I am just happy that it worked. And WordPress 2.0’s interface is really nice!

Update: This is so called “garbage-in, garbage-out” solution and doesn’t solve the core problem… I need to look into it in the future…

Leave a Reply