We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14287
    • 2 Posts
    I recently started thinking about upgrading a web site that I manage from MODx 0.9.6.1p2 to 1.0.5 and decided that today was the day to do it. I have dev server where I set up an exact duplicate of my live site in the hopes of not screwing anything up. I followed the upgrade instructions (http://wiki.modxcms.com/index.php/Upgrading_Guide) and everything went off without a hitch with one exception. Now when I visit the site, certain special characters like ’ show up as ’ or “ and ” show up as “ and â€￾. On my live site that runs 0.9.6.1p2 there are no problems of this nature. Does anyone have any idea why this might be happening?

    Technical info:
    MODx: 1.0.5
    PHP: 5.2.6 (PDO_mysql installed)
    Server: Apache/2.2.3 (CentOS)
    MySQL: 5.0.22
    Database Charset/Collation: UTF8/utf8_general_ci
    Database Tables are a mix of of UTF8 and Latin1 for some reason and the collations vary as well (utf8_general_ci/latin1_swedish_ci)

    Any help on this would be greatly appreciated. Thanks in advance.

    PS. I do realize that when at all possible such characters should be entered as HTML escape chars, but, this site has many, many non-web savvy users that paste a lot from MS Word.
      • 3749
      • 24,544 Posts
      Quote from: jlopez at Mar 21, 2011, 02:45 PM

      Database Tables are a mix of of UTF8 and Latin1 for some reason and the collations vary as well (utf8_general_ci/latin1_swedish_ci)

      That’s most likely the cause of the trouble. Those Latin1 characters are being interpreted as UTF-8.

      This may help prevent future trouble: http://bobsguides.com/convert-db-utf8.html. I’m not sure what effect if will have on the existing problem characters.
        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
        • 14287
        • 2 Posts
        Yes! that did the trick! Thanks Bob’s Guides!
          • 3749
          • 24,544 Posts
          It always seems to work -- and I’m always surprised when it does. wink
            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