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

    I can’t make the manager store Vietnamese characters. They are being converted to question marks after saving.
    Is there a way to show characters like these:
    ậ ạ ấ ă ư ứ ư ờ ơ ớ ế ề ệ

    Thanks for the help!
      • 28215
      • 4,149 Posts
      splittingred Reply #2, 16 years ago
      Is your database in UTF-8?
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 14730
        • 34 Posts
        Yep!
        MySQL charset: UTF-8 Unicode (utf8)
        MySQL connection collation: utf8_unicode_ci
          • 5340
          • 1,624 Posts
          What about the tables or the table that stores those values?
            • 14730
            • 34 Posts
            Quote from: cipa at Oct 13, 2010, 10:09 PM

            What about the tables or the table that stores those values?
            The collation there is latin1_swedish_ci

            For templates, content, etc.
            That’s strange, isn’t it? Especially when I assign utf8_unicode_ci during install.

            Is there a query to replace all ’latin1_swedish_ci’ entries and replace them with ’utf8_unicode_ci’
            Or change all filled Collation’s into ’utf8_unicode_ci’
            It’s all in the structure, not in the entries themselves...

            Thanks!
              • 3749
              • 24,544 Posts
              Quote from: Jorik at Oct 14, 2010, 12:29 PM

              Quote from: cipa at Oct 13, 2010, 10:09 PM

              What about the tables or the table that stores those values?

              Is there a query to replace all ’latin1_swedish_ci’ entries and replace them with ’utf8_unicode_ci’
              Or change all filled Collation’s into ’utf8_unicode_ci’

              No, that would make things worse because it doesn’t change the actual data in the tables. You could try this:

              http://bobsguides.com/convert-db-utf8.html

              It’s not extensively tested yet, but so far it seems to work with the Revolution DB and should work with earlier versions.

              As always, back everything up first.

                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
                • 14730
                • 34 Posts
                I postponed it for a while, but finally did it. And it worked!

                So a big thanks to you BobRay. You saved my day ones again!

                For future users: the conversion does clear all entries after encountering a funny character (like à) so a backup is mandatory.

                Furthermore: I didn’t stick to the readme.txt.
                I didn’t want to set up a local server with db. Importing my original db to temporary db failed because of the mixed charset/collation.
                So, since I just installed Revolution, I ran it over my original, almost empty db.
                Saves a lot of time, it’s a matter of minutes now.