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: I was told from a friend that this problem is called “garbage-in, garbage-out.” My solution above doesn’t solve the core problem… I need to look into it in the future…

Related posts:

  1. Turncated Japanese in MySQL
  2. Word Press problem
  3. Digital Camera Problem
  4. Much ADO about Microsoft?
  5. Fedora Japanese Font lssue resolved!
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. I blog about... whatever that comes to my mind.
  • Change color

    Purple Red Green Blue No Style

  • Archives

  • Calendar

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