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 ?

Comments 2

  1. B Shantanu wrote:

    Dear Amit,
    I too had some “Devanagari” posts on my wordpress hosted blog but when I migrated to my own domain, I lost all the “devanaagari” script…

    Pl see the post below to understand what I mean

    http://satyameva-jayate.org/2008/02/19/there-is-a-rashtra-in-maharashtra/

    Can you please help? I am not very sophisticated technically

    If you wish, you can email me at jai.dharmaATgmail.com

    Thanks so much
    Shantanu

    Posted 23 Jul 2008 at 5:26 am
  2. M. Liu wrote:

    Thank you very much for posting the info! Saved me much time!

    Posted 03 Sep 2008 at 7:44 am

Post a Comment

Your email is never published nor shared. Required fields are marked *