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

    I’m making a multilingual site that needs to use simplified chinese characters though when I tried
    inserting the text, the preview was giving the huh?? characters.

    I’ve checked my modx system info and it says
    MODx version  	   	1.0.4
    Version codename 	  	rev 6981
    phpInfo() 	  	View
    Access permissions 	  	Enabled
    Server Time 	  	21:45:05
    Local Time 	  	21:45:05
    Server offset 	  	0 h
    Database name 	  	drlanggu_modx
    Database server 	  	localhost
    Database Version 	  	4.1.22-standard
    Database Charset 	  	latin1
    Database Collation Charset 	  	latin1_swedish_ci
    


    Whereas: mySQL database is using UTF-8 unicode and UTF8_UNICODE_CI for the coalition


    Can I still change the database charset and collation charsets in MODX?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      MODx is merely reporting what a query to the database returns. If System info says latin1,that’s what the actual MODx database is using.
        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
        There is a tool for converting the database to full utf-8 here: 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
          • 32052
          • 38 Posts
          Hi all

          Thank you for your replies. It seems that I have to do BOB’s GUIDES. I hope I will not make any mistakes.
          If ever, can I do it manually in phpMyAdmin? If I do it manually will there be some errors?

          Cheers!
            • 3749
            • 24,544 Posts
            It’s *much* safer to use the script I linked to. Just export the DB first to an SQL file, then you can restore it if things go wrong, but the script I linked to shouldn’t touch your data, just its charset setting.
              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
              • 32052
              • 38 Posts
              It’s *much* safer to use the script I linked to. Just export the DB first to an SQL file, then you can restore it if things go wrong, but the script I linked to shouldn’t touch your data, just its charset setting.

              Hi,

              what is the link fish? I’m getting lost with the steps of bob’s solutions because i’m still new with the database stuffs.
              Does your solution a bit easy to follow and safer to do for the noobie like me?

              I was thinking of doing it manually like one field to another. If I do this manually is it safe like no errors at all?

              Thanks!

                • 32052
                • 38 Posts

                Hi again,

                When you the bob’s script. Do I just need to download a copy of the database and run the script?
                where does the php script be placed and run?

                Cheers!
                  • 3749
                  • 24,544 Posts
                  There’s a readme.txt file in the .zip package with step-by-step instructions. smiley
                    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
                    • 32052
                    • 38 Posts

                    There’s a readme.txt file in the .zip package with step-by-step instructions.

                    Hi Bob,

                    I’ve read the readme.txt already but I wasn’t able to understand them fully since I’m a newbie (sorry about this)
                    I haven’t handled any database manipulation or even using phpmyAdmin. I would like to take this opportunity to ask
                    you questions to lead me finishing this walkthrough.

                    Where should I run the cdc.php script? is it in local or remote? should I place it in any directory?

                    Cheers!
                      • 3749
                      • 24,544 Posts
                      You run the cdc.php script on the local machine, but not from within MODx. Be sure to edit the first lines of it to match the local DB you created and the charset you want.
                      (This assumes that you’ve installed XAMPP or something similar so that you have PHP on your local machine.)

                      You can type php cdc.php on the command line if you have the php program in your path.

                      You should also be able to run it by putting it in your xampp/htdocs directory and putting http://localhost/cdc in the browser’s address window.

                      cdc.php sends all its output to the screen and you then cut and paste it into the SQL query box in PhpMyAdmin while working on that local 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