MySQL encoding problem after site move

Posted by Quan Zhou on Server Fault See other posts from Server Fault or by Quan Zhou
Published on 2010-05-14T03:00:16Z Indexed on 2010/05/14 3:04 UTC
Read the original article Hit count: 407

Filed under:
|
|

Guys, I need your help.

Since last month my friend has lost his database on Dreamhost, he decided to move his wordpress based blog site (written in Chinese) to my server.

He's using a wp-plugin called wp-db-backup to perform regular db backups. And the servers backgrounds are:

Dreamhost: Linux 2.6.31.5-modsign-aufs2-grsec-2-opt mysql Ver 14.12 Distrib 5.0.16, for pc-linux-gnu (i386) using readline 5.0 apache2 unknown version

My Server: Linux li159-46 2.6.32.12-x86_64-linode12 mysql Ver 14.14 Distrib 5.1.45, for debian-linux-gnu (x86_64) using readline 6.1 nginx 0.8.36

His site's encoding was UTF-8 in both wp-config and db. I imported his db backup file in UTF-8 by default, then I sync'd files using rsync from dreamhost, then I just changed the db address and nothing more.

But when I take first look at the "new" site, it was full of unreadable characters, I met this problem before, I changed charset options in browser but none of them can make it displayed properly. Then I converted his db to GB18030, it works with only if browser set charset to GB18030 either GBK, but by default they recognize the charset as UTF-8. I tried to edit the headers but it doesn't work.

What could I do now?

Thx~~

© Server Fault or respective owner

Related posts about linux-server

Related posts about mysql