Tagged: Character encoding Toggle Comment Threads | Keyboard Shortcuts

  • Joe 22:32 on January 6, 2009 Permalink
    Tags: Character encoding, charset, , encoding, , utf8,   

    WordPress config & database charset 

    Image representing WordPress as depicted in Cr...

    Image via CrunchBase

    As part of upgrading to WordPress 2.7, the character encoding of some existing posts appeared suddenly broken.

    Turns out that the charset specification from wp-config.php was not interpreted correctly any longer as UTF-8; changing the name from ‘utf8‘ (without dash) to ‘utf-8‘ did the trick.

    Update Feb 24: my error log shows lots and lots of warnings like these:

    WordPress database error Unknown character set: 'utf-8' for 
      query SET NAMES 'utf-8' made by require, require_once,
      require_once, require_once, require_wp_db, require_once

    The right solution seems to remove (comment) the line specifying the DB_CHARSET alltogether:

    /** Database Charset to use in creating database tables. */
    // define('DB_CHARSET', 'utf8');

    Read more about editing wp-config (wordpress.org)…

    Reblog this post [with Zemanta]
    • gemp 20:56 on January 16, 2009 Permalink | Reply

      You just saved my life (and a friendship).


  • Joe 14:26 on June 27, 2006 Permalink
    Tags: Character encoding, , , , , , web server, , XMLHttpRequest   

    XMLHttpRequest and character encoding 

    The XMLHttpRequest transport method retrieves content over http, just like a regular http request from a web browser does.

    There are two result variants:
    The responseXml field holds a parsed DOM tree if the retrieved source was well formed XML
    The responseText field holds the raw source, a Javascript string basically.

    With current Firefox versions (1.5.x) this responseText string is always forced into UTF-8, regardless of the charset encoding sent by the originating web server. Thus valid ISO-8859-1 characters end up as illegible garbage in resulting Javascript string.
    This can be a problem for instance with Greasemonkey scripts targeted at a server, which uses something other than UTF-8 as encoding format.
    (More …)

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc

Twitter links powered by Tweet This v1.8.3, a WordPress plugin for Twitter.