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

    I've recently moved a site from one server to another and all has gone well this time (I learnt from a previous move/post here) except that some ASCII symbols have been replaced with symbols (e.g. apostrophe becomes ’). This has happened in some places but not others, in both richtext and normal textareas.

    Is there a more automated solution to revert them site-wide (reimporting the SQL file etc) rather than going through and manually changing all the occurrences?

    Thanks

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

    [ed. note: cottoncreative last edited this post 11 years ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Are you sure that your databases are using the same charset and collation? BobRay has a script to help with collation and charset mismatches.

      http://bobsguides.com/convert-db-utf8.html
        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
        • 50574
        • 70 Posts
        I think you might be right, the original was Latin1 the new one is UTF8.
        I keep getting errors using BobRay's script when copying the SQL from the cnc.php generated text.

        Error
        SQL query:

        ALTER TABLE modx_access_actiondom DROP INDEX `target` ;
        MySQL said: Documentation

        #1091 - Can't DROP 'target'; check that column/key exists
        Any ideas?
        When I compared the two downloaded sql files there are more differences than just the timestamp. A few auto-increments were also different, should I correct those in the sql before proceeding with the instructions?
        • discuss.answer
          • 39519 ☆ A M B ☆
          • 79 Posts
          I'd suggest (if possible) trying a re-install using the correct collation. I haven't tried Bob's script, but I have had this happen, and it's better to just nip it in the bud if possible and reinstall.
            Mat Dave Jones
            • 12410
            • 353 Posts
            id guess deleting core/cache folder and creating a new one. Maybe rerun setup then
              • 50574
              • 70 Posts
              Thanks all.

              I had already succumbed to the best idea being to reinstall it all. So I did and kept the Latin1 collation and it's all running fine now. I'll give Bob's script a go again at some point but I guess 'if it ain't broke' and all that...