We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53201
    • 1 Posts
    Hi!
    I already googled for hours, but didnt find any solution for my problem after installing revo 2.5.1 (due to a switch of the php-Version of my webhoster).

    My situation:

    - i installed some years ago and old MODX version. now i wanted to update MODX and thought its better to make a fresh install.
    - i didnt delete the OLD database structure and data, i installed revo 2.5.1 with a different table-prefix to the same database.
    - wanted to copy each content from the old table "modx_site_content" to the new table.

    after doing that, content on the frontend / and in the managers edit-field is displaying wrong special characters.
    for ex. Â and ï

    my config.inc.php says:

    $database_connection_charset = 'utf8';
    $database_dsn = 'mysql:host=localhost;dbname=...;charset=utf8';

    Can anybody give me a hint what i could do to display the proper characters?
    thx!
      • 3749
      • 24,544 Posts
      If you look at both DBs (the old one and the new one) in PhpMyAdmin, you can see the character set of tables and fields on the Structure tab.

      It's difficult to advise you without knowing the character for each DB and whether it's consistent within each DB.

      utf8 is the recommended setting for MODX.

      If the old DB is all utf8, the safest thing to do would be to delete the new DB and start over. When you create the new one, select utf8_general_ci or utf8_unicode_ci (whichever the old one is) for the character set. Then you can install MODX and copy the site_content table over with no problems.

      If the old DB is all latin1 and the new one is utf8, it's more complicated. What I would do is back up the old DB, then use the script here: http://bobsguides.com/convert-db-utf8.html to convert it to utf8. Make sure the old site looks OK before proceeding. Then drop the site_content table from the new DB and copy that table from the old DB.



        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting