UTF Encoding and MySQL 4.1 (6 posts)

  1. RustIndy
    Posted 10 years ago #

    As some of you are aware, I help run the innereyes.com free blog host. We use WordPress, and have recently started getting a lot of traffic from countries like China, Korea and even Isreal. Which brought up a problem I wasn't aware of until now.

    Many people have complained that extended characters aren't being properly displayed. WP is set to UTF8 by default (and most people haven't changed that) and MySQL is set to use UTF8. So why aren't these extended characters being properly stored and displayed?

    The patch we found that seems to have worked for some people but not for others was to add the line $this->query ("SET NAMES 'utf8'"); after line 43 in wp-db.php. Unfortunately, this seems to break many people's older posts, although new posts are properly encoded and displayed.

    So the question is: where, exactly, is this bug from? Is it a WP bug? A MySQL bug (that's my guess)? An Apache bug?

    And how can this bug be fixed without turning older posts into gibberish?

  2. RustIndy
    Posted 10 years ago #


  3. RustIndy
    Posted 10 years ago #


  4. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    Are your visitors' browsers set to accept the site's encoding (currently set at UTF-8), or are they set to override it with a default encoding?

  5. RustIndy
    Posted 10 years ago #

    I can't really speak for anyone else, but mine's set to "auto-detact/universal" in Firefox.

    But with some of these blogs, the users are seeing new posts properly and old posts are replacing extended characters either with different extended characters, entity codes, or question marks. There doesn't appear to be a pattern that I can make out, but since I can't read anything other than english and bits of french, spanish and italian, I have no idea whether the eastern languages are working or not - some say yes, some say no :(

  6. epicure
    Posted 9 years ago #

    As far as I know it is related to MySQL 4.1. See this thread:
    or some other discussions:

Topic Closed

This topic has been closed to new replies.

About this Topic