We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24983
    • 59 Posts
    Hi all, I’ve tried searching the forums for my problem, but with no luck. So I’m coming here now, asking for help.

    My problem is that I have a norwegian site, with the both the mysql database and the manager set up to use utf-8 unicode. On the site itself norwegian characters like "æ, ø, å" is shown correctly, but in the manager navigation tree I, as well as when I edit pages, these chars is shown like ø etc.
    Note this is problem is only for pages, not for the "Sitename".

    Example, I edit the title of a page to: "Resultat fra søk" (search result).
    When I save the page, the title is shown like "Resultat fra søk".
    The title is shown correctly on the page itself.

    I’m using MODx 0.9.6.2, this was not a problem in 0.9.6.1.

    Any ideas? huh

    Tnx.

    EDIT: Never mind, I found the solution.

    I had to edit /manager/includes/config.inc.php and change

    $database_connection_charset = ’utf8’;
    to
    $database_connection_charset = ’’;

    Seems like it was a case of double utf-8 encoding. This should maybe be filed like a bug?
      • 22303 MODX Staff
      • 10,725 Posts
      Sounds to me like although your database is utf8, you have been forcing non-utf8 content to MySQL which is getting translated back and forth on the fly to the charset specified as the default for your MySQL configuration. This is why when you specify utf8 now, which is correct, it’s not converting the content stored improperly in the database back to that default again, as it thinks it is already utf8. This is a mess, and you likely need to use SET NAMES latin1 (or whatever the actual MySQL client default connection charset is on your system) to work it out now as you have been fooled into thinking you were storing content in a UTF-8 presentable charset.
        • 24983
        • 59 Posts
        Ok, I followed the instructions here: http://www.serbuntu.net/ubuntu/mysql/utf8 , but I still got to have

        $database_connection_charset = ’’;

        set for things to work. Anyways, it’s working now so no problem. smiley Thanks for the reply opengeek.