Asian-Caucasian Issues

WordPress 2.9.1, beware of encoding issues

I’ve just spent an hour and a half upgrading to WordPress 2.9.1. Why did it take that long? Well, their database upgrade assigned the wrong collation to the fields in the database, rendering all the double-byte characters in my posts as ???. Very annoying and a pretty major oversite for such a widely adopted piece of software.

After searching around the WordPress Forums, I found this post which blames the Gengo plugin for these encoding problems: [Plugin: Gengo] characters showing as ?????.

What was the solution? Open up phpMyAdmin. and:

1. Change the collation for each table to “utf8_general_ci”

2. Change the collation of the offending fields to “utf8_general_ci”

It’s a pain, but it’ll solve the issue. Hopefully, the next WordPress version will solve this problem.


Categorised as: Web development


6 Comments

  1. elie says:

    Hey. I tried that for my blog, which was updated to WP 2.9.1 and all the Hebrew characters went wonky. Is it possible it’s another version of utf8 I want? Or something different?

    Any help appreciated.

  2. mike says:

    Hi Elie,

    I’m not sure I can help here, I barely know anything about DB collation / encoding, but it might have something do with the encoding you’re serving your pages under.

    Check 2 things:
    1. The encoding of your php files – are they saved as UTF-8 without the byte-order mark (BOM)?
    2. The meta tag in your HTML :

    Hope that helps.

    Mike

  3. mike says:

    Well, I just checked your site, it looks like it’s serving as UTF-8. Perhaps the characters were corrupted during your last upgrade? Do you have a backup of the database before you upgraded it?

  4. elie says:

    I do have a back up… What can I do?

  5. elie says:

    no worries, a friend of mine helped me out. thanks.

  6. Hello there, I discovered your site via Google even as searching for a similar topic, your website came up, it appears great. I’ve bookmarked it in my google bookmarks.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>