Tag Archives: charsets

Did wordpress upgrade destroy all your unicode posts ?

I upgraded wordpress software for this blog to version 2.5.2. After that none of the posts that had devanagari (unicode) text looked okay. After comparing the configuration files, I discovered that the troubling variable is DB_CHARSET. The default config setting is 'utf8'. But if you have been updating the software versions, your database table is probably in 'latin-1' charset, though wordpress has been saving unicode data to the tables. Once you remove the DB_CHARSET setting (or setting it to latin-1 or ''), things return to normal.

The setting is in the file wp-config.php in the wordpress install directory.
The value before change:
define('DB_CHARSET', 'utf8');

The value after change:
//define('DB_CHARSET', 'utf8');
define('DB_CHARSET', '');

So maybe I should try to recreate the tables with correct charset defined in mysql some day ?