• Resolved jbiesnecker

    (@jbiesnecker)


    Hello everyone,

    I have a newly installed copy of WordPress 3.01 (on Dreamhost via the auto installer, if that makes any difference), and I have Chinese text in my entries. Everything is fine on the frontend, the Chinese displays fine, no worries. However, when I look in the database, all of the characters are turned into garbage (i.e., é±¼ instead of 鱼). This is a problem when I want to run custom queries on the post_title field, because select * from wp_posts where post_title = '鱼' doesn’t match anything.

    The database and the tables inside it are set to UTF-8, as is the character encoding setting in WordPress. What else do I need to do to make sure that characters are being properly encoded in the database? I want to get this fixed before I have too much data in the blog (though I checked and the export file is properly encoded, so at least I’d be able to do that).

    Thanks,

    John

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jbiesnecker

    (@jbiesnecker)

    Nevermind, I just discovered the define('DB_CHARSET', 'utf8'); thing, and adding it to wp-config.php solved my problem. Why is this not the default setting??

    DO you happen to know what’s the solution for an RSS feed in chinese that is displayed in gebrish.
    couldn’t find a solution for this yet.
    thanks,
    Shlomo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘UTF-8 characters showing up as garbage in database’ is closed to new replies.