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.