Recently, I migrated my home server to DH, and after transferring the wordpress database from MySQL V4.1 to V5.0, all chinese content was displayed as ?? on the webpage. With a little search, you could find the solutions in wordpress support pages, but information are sparse; So, I summarise the solution here:
- Firstly, ensure the wordpress database and its table are showing [color=#CC0000]unicode_general_ci[/color] in [color=#0000CC]collation[/color] field. Mine was already set while restoring from the database dump.
- Go to your wordpress directory wp-include/wp-db.php, after this line:
$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);Add this:
$this->query("SET NAMES UTF8");That’s it.
my blog on the subject