We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4358
    • 3 Posts
    Hi, I’m newbee here and need your help. I’ve a MODx site on a resller account. Recently I’ve moved to other host. Now unicode characters don’t display correctly. I guest it because of defferent versions of mySQL server on the new host. Is it also MODx specific problem because my other sites with Joomla!, Wordpress, phpNuke.. work properly after transfer. Please advice how can I resolve this problem (step by step because I’m a newbie ;-)

    MODX: 0.9.6

    Old site: http://66.29.36.130/~myanh/modx/
    PHP 4.4.7
    MySQL :4.0.27- standard
    Apache: 1.3.39

    New site: http://myanh.info
    PHP version 5.2.5
    MySQL version 5.0.45-community
    Apache: 2.2.6
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      MODx specifies a connection character set, so you need to check the config.inc.php file to make sure it matches up with your new database server’s character set.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 4358
        • 3 Posts
        Thank you for your promt reply. I found in config.inc.php
        $database_connection_charset = 'utf8';

        DB character set on the old server is latin1, on the new server it shows Unicode utf8 (the tables however show collate latin1_swedish_ci).
        To which charset should I change in config.inc.php now?

        Sorry for the newbie question.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Hm... that might be a good question, since the two databases don’t match. Well, since it says utf8 and you have a problem, try the iso-8859 one.

          http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 4358
            • 3 Posts
            Now I’ve found a work-around:

            -open the .sql script in Dreamweaver and save as Unicode file dump_1.sql
            -create a new database on my local PC with Xampp and mySQL 5
            -import the sql script into the new database (character of file: utf8)
            -export the new database in phpMyAdmin save as dump_2.sql
            -on my hosting server: delete the existing database, create new database with the same name then import the file dump2.sql -> voila!

            Still question: I’ve tried on my host to import the file dump_1.sql directly but it still shows collate swedish_general_ci so I have to create the dump_2.sql on my local PC and it works. huh