We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    Hello All:

    This is actually a question I should know, but I feel a bit confused. I have sucessfully dealt with this issue before, but my brain seems highly skilled at forgetting useful info.

    I am starting up a new modx install, and want to display Chinese on some pages and English on others. Right now, however, all the Chinese just turns into question marks and the occasional random smiley.

    Is this strictly an issue of UTF-8? We are getting the db controller or whatever changed now, but I want to confirm that its strictly a db collation issue, and not that I have failed to install some sort of language pack for Chinese language support.

    Babel and migxMultiLang would then be different issues...about managing languages rather than just displaying...is that correct?

    Thank in advance, hope this one is easy to answer! smiley

    This question has been answered by sottwell. See the first response.

    • discuss.answer
      Yes, that is a database charset/collation issue. As long as your MODX installation (modx_charset), your database and the charset meta tag in your template are all the same you'll be fine. You might also want to check the config.inc.php file to make sure it has the proper charset for the database connection.
      $database_connection_charset = 'utf8';
      ...
      $database_dsn = 'mysql:host=localhost;dbname=revo2214;charset=utf8';
      
        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
        • 46886
        • 1,154 Posts
        Thank you so much, I really appreciate the confirmation. Its tricky because you have to confirm the settings in several places.

        The problem is now solved! Thanks again Susan!
        • When someone uses CPanel's database wizard to create a database and user, the first thing they have to do is to use phpMyAdmin to change the charset and collation of the database to utf8. Otherwise, the text fields will be the MySQL default, usually latin-1. It's possible to configure MySQL to use utf8 by default, but hardly any hosting provider does that.
            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
            • 3749
            • 24,544 Posts
            If you need to convert, see this: http://bobsguides.com/convert-db-utf8.html
              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