We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39498
    • 169 Posts
    I have some arabic characters in the tiny mce. In the editor they get displayed properly, but after save there are only questionsmarks. How to get it right?
      • 42562
      • 1,145 Posts
      Is this a problem with TinyMCE or your database?
      Test by disabling TinyMCE - same problem, right?

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

      https://forums.modx.com/thread/?thread=22960&i=1&page=2
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 39498
        • 169 Posts
        Damn it. Your' right. My database is latin1_swedish_ci.
        How can I assure or test that a db conversion will fix it?
          • 42562
          • 1,145 Posts
          When you try it and it works, then you will be sure.

          1. Backup your database
          2. Place all your natural faith in BobRay
          3. Have confidence because I did it successfully for Chinese
          3. Read the instructions carefully and do the deed
          4. Prepare for the worst, but don't swear when it happens!
          5. Prepare for intense joy when success comes [ed. note: donshakespeare last edited this post 10 years, 7 months ago.]
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 3749
            • 24,544 Posts
            As donshakespeare says, there's a conversion script and the process to use it here: http://bobsguides.com/convert-db-utf8.html.
            To my knowledge, it has not been tested with the current version of MODX, so back things up and let us know if it works or not. [ed. note: BobRay last edited this post 10 years, 7 months ago.]
              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
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I just used it (with some fiddling with the output) to convert to utf8mb4, so it seems to still be working fine.
                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
                • 39498
                • 169 Posts
                It is not the newest modx installation. I will give it a try and return.
                  • 3749
                  • 24,544 Posts
                  Quote from: sottwell at Feb 06, 2016, 08:24 PM
                  I just used it (with some fiddling with the output) to convert to utf8mb4, so it seems to still be working fine.

                  Good to hear, thanks.
                    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
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    For the utf8mb4 conversion, I edited the output in a text editor, replacing all the "varchar(255)" with "varchar(248)", thus making those fields small enough to fit in the 1000-char limit for indexes, while not really hurting the use of the fields.

                    Of course, if somebody is using the full 255 characters of the original varchar setting, they'll lose the last 8 characters. So it's not a really great solution. But if one wants to use one of the languages that requires the full 4-byte range of standard utf8, it's about the only option.

                    Really, only the fields used for the indexes need to be shorter, but that's something that has to be dealt with in the schemas themselves.
                      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
                      • 39498
                      • 169 Posts
                      I now return to that topic.

                      After converting the db I have a problem with the image urls.

                      The src before was:
                      /assets/components/phpthumbof/cache/myimg.31e71fe2c4db6de58509e28c20f0b3571532.jpg
                      

                      after its not found anymore:

                      <b>Warning</b>:  file_get_contents(/www/htdocs/myimg.jpg) failed to open stream: Datei oder Verzeichnis nicht gefunden…


                      didnt find any solution yet.