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

    I uploaded a site to a live server and noticed that the Database Collation Charset has changed.

    local server settings below:

    Database Charset : utf8
    Database Collation Charset : utf8_general_ci


    live server settings below:

    Database Charset : latin1
    Database Collation Charset : latin1_swedish_ci


    the site seems to be working ok but can the change cause any problem?

    and is it easy to change to utf8?

    I site will be displaying japanese characters in the future.

    thanks for reading

    Tim
      • 20413
      • 2,877 Posts
      phpMyAdmin uses latin1/latin1_swedish_ci as default setting for new databases.

      I once manually converted a MODx database from latin1 to utf-8. First export it with Drop Table
      statements and then I did find/replace in the dump file, and imported it back.
      That wasn’t enough... The rows of records where still keept in latin1. It took me hours and
      a lot of growling. Something I don’t recommend to do...

      In your case - just start over! But this time, Set right charset and collation. smiley
      Or keep latin1 and save files in ANSI.

      http://winrus.com/utf8-jap.htm
      http://fetchsoftworks.com/fetch/help/Contents/Concepts/CharacterEncoding.html
      http://modxcms.com/forums/index.php/topic,45035.msg266991.html#msg266991
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 3749
        • 24,544 Posts
        I think you could run into trouble on a couple of fronts. The actual data in your tables is utf-8, so it doesn’t match your settings. Also, adding the japanese characters could be a problem.

        I’d advise starting over and creating a new DB on the remote server. Use PhpMyAdmin to create the DB and select utf-8 for everything as you create it.

        When you export the local DB, look at the .SQL file that’s created to make sure everything in there is utf-8. Do a search for "Latin" and "Swedish" to make sure they don’t appear.
          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
          • 36668
          • 26 Posts
          Thanks for the quick replys,

          i went and logged into phpmyadmin (on the live server) to do the mentioned above but noticed that the database on the live server is saying the Collation is latin1_swedish_ci but each of the records are set to utf8_general_ci see attached jpg.

          if that is the case in phpmyadmin could i go to the Operations tab and at the bottom where its saying collation select utf8_general_ci click go and it would change the the database setting to match the records settings? is it that easy? sorry i wasnt too clear in my first post.


          Tim

            • 3749
            • 24,544 Posts
            I don’t know enough about it to give you a solid answer. I think that would work, but it’s a question of whether the Latin1 setting had any effect on the data when it was imported. I don’t think it would have but I’m not absolutely sure.

            You’d have to rerun MODx setup after the change (be sure to clear the MODx cache and your browser cache/cookies before running setup).


              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
              • 36668
              • 26 Posts
              thanks for the advice, i will give it a try and report back.

              Tim
                • 36668
                • 26 Posts
                Hi,

                a late response but, i did the following i mentioned in this thread and it seemed to go ok as the site is working.

                Tim