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…

This entry was posted in Linux, Mac, and LAMP Open Source. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Welcome…

    ...to Daigo’s Daily Digital Diorama. This is utterly useless online journal (yes, that was what it was originally called before term "blog") that I've been keeping since 2002. Since it is ".org," my wife once called it a nonprofit nonsense. I use this blog mostly about baseball, and being Japanese man in America. Wondering who the heck Daigo is?

  • Color Switcher

    Purple Red Green Blue No Style

  • My websites

    JapaneseBallPlayers.com
    A bilingual websites dedicated to bring you the information on Major League Baseball players from Japan.

    Go-RedSox.com
    Japanese language blog about Boston Red Sox.

    Daigo Fujiwara portfolio
    My work as graphic designer/web designer.

    Daigo.org
    Personal blog that I've been keeping since 2002.

    Itadakimasu
    I like to eat. And taking photo of it.

  • Calendar

    March 2006
    M T W T F S S
    « Feb   Apr »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Past entries

  • Topics that I cover

  • Flickr