blog troubles

Over the holidays I upgraded this blog to WordPress 2 and immediately found that all the accented characters in the posts ‘corrupted’.

The solution was to add this line to the file /wp-includes/wp-db.php after line 43. Here’s the code in context:



function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {

$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);

mysql_query(“SET NAMES ‘utf8’”); // unicode support on!

if (!$this->dbh) {

$this->bail(“

This article describes the problem and the solution.

This entry was posted in IT by escdotdot. Bookmark the permalink.

About escdotdot

Researching contemporary art, sound, and experimental music in China. Living in Hong Kong. With a PhD from Hong Kong Baptist University, Academy of Visual Arts.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.