MySQL encoding problem after site move
- by Quan Zhou
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~~