Trevin Chow

Microsoft Group Program Manager and Seattle Photographer

Archive for the ‘utf8’ tag

Strange characters after Wordpress upgrade

View Comments

If you're new here, you may want to subscribe to my RSS feed and follow me on Twitter. Thanks for visiting!

After I upgraded my last wordpress installation on my blog and on Green Is Sexy, strange characters were appearing in our content throughout the site. There seemed to have been encoding problems with apostrophes (‘), quotation marks (“) and hyphens (-). They’d be displayed as question marks or ’.

Turns out that the fix is really simple. By default, the Wordpress config files now set your character encoding to UTF-8. The solution is to open up wp-config.php file and located these lines:

define(’DB_CHARSET’, ‘utf8′);
define(’DB_COLLATE’, ”);

and either remove the “utf8″ string so the first line becomes:

define(’DB_CHARSET’,'');
define(’DB_COLLATE’, ”);

or you can just comment the lines out completely by prefixing each line with “//”:

//define(’DB_CHARSET’, ‘utf8′);
//define(’DB_COLLATE’, ”);

Problem solved!

Written by Trevin

September 19th, 2007 at 2:55 pm

Posted in Technology

Tagged with , , , ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes