Trevin Chow

Microsoft Group Program Manager and Seattle Photographer

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!

Related Posts

  1. Fix for Wordpress “Allowed memory size exhausted” fatal error
  2. Experimenting with new Wordpress template
  3. Windows 7 Upgrade Option and Microsoft Store
  4. Moved from Windows Live Spaces to Wordpress
  5. Banishing “Nofollow” for user content

Written by Trevin

September 19th, 2007 at 2:55 pm

Posted in Technology

Tagged with , , , ,

  • Shelly Tucker
    You saved me! My hero.
  • Paul
    Thanks!!!
  • kai
    Thanks! This worked like a charm. I wonder what happened to the couple of posts I edited to remove the strange characters? Oh well.
  • Michael
    Thanks, man! I had the *exact* thing happen last time I upgraded, but I tend not to store facts like that and had forgotten what I did to resolve it; I guess my cache is too small... Glad that someone was thinking to blog this!
  • thanks, that fixed it for me!
  • Worked for me as well, thank you so much!
  • Thanks this worked perfectly!
  • ShaRBiL
    Didn't work with me!
    still have (????)
  • Chetan
    Thanks. This really helped. I was getting these  characters after the upgrade.
blog comments powered by Disqus
Get Adobe Flash playerPlugin by wpburn.com wordpress themes