We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17750
    • 78 Posts
    OpenGeek, that’s right!
    In my.ini was set (by default) ’latin1’
    It turns out that there are quite topics written on it with settings for connecting to DB.
    The problem comes, from one side – the usage of hosting services, that don’t allow configuring the settings of MySQL, and on the other hand - uncertainty about the methods of connecting to DB. (How nice would be if MySQL used only UTF and no collations grin)

    I think, it would be a good idea, while installing MODx in the section concerning the connection to DB – under the select bar, to be written the following:
    "If you are sure, that character and collation of the server and database are the same, then use SET CHARACTER SET. Otherwise, use the SET NAMES. For more details !

    Would be good also to discuss whether it is not better MODx to use only UTF8 - hardcore set. This is a kind of extreme proposal, but it solves "the problem with character set" once and for all grin grin grin

    Best Regards,
    Lyubomir
      • 36592
      • 970 Posts
      I’m using 0963-RC1 and have problems.
      The one is that I can not undelete deleted documents by the context menu on the document tree.
      When I try to undelete them, it says " ’document’ has not been deleted. ".
      Am I the only one who encounter this problem ?
        • 36592
        • 970 Posts
        And I found one more problem.

        With the MODx built-in file manager ( Resources -> Manage Files ), special characters are not treated properly.
        In manager/actions/files.dynamic.php, there is this line.
        <?php echo htmlentities($buffer)?>

        I think I have to add some other parameters to the function ’htmlentities()’ something like this...
        <?php echo htmlentities($buffer,ENT_COMPAT,$modx_charset)?>

        I’m a php noob so I’m not sure this modification is enough to do ?
        • tkfm please file that as a bug in Jira. Thanks!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 36592
            • 970 Posts
            Quote from: rthrash at Oct 29, 2008, 04:32 AM

            tkfm please file that as a bug in Jira. Thanks!
            Done.

            http://svn.modxcms.com/jira/browse/MODX-464
            http://svn.modxcms.com/jira/browse/MODX-465
              • 9941
              • 65 Posts
              Hey I was having problems with the charset and connection settings.... looked at previous config files and they were empty.... My problem was that a variety of characters were coming back strangely converted.... an every time I saved a document it would reconvert the converted characters to even more unrecognized characters. So setting both of those like this:


              $database_connection_charset = ’’;
              //$database_connection_method = ’SET NAMES’;

              made all the problems go away.... previous versions of ModX did not use these settings. What is the advantage?

              • Quote from: foniksonik at Nov 26, 2008, 04:22 PM

                an every time I saved a document it would reconvert the converted characters to even more unrecognized characters. So setting both of those like this:

                $database_connection_charset = ’’;
                //$database_connection_method = ’SET NAMES’;

                made all the problems go away.... previous versions of ModX did not use these settings. What is the advantage?
                That indicates that you were storing the characters into the wrong charset or using the wrong charset connection in MySQL previously.  If it works with the settings incorrect as you have them (charset should match the charset of your database and you definitely should not comment out the method), that’s exactly what happened.  Most likely you have a utf8 database and a MySQL client API set to latin1 by default.  You’re unfortunately in quite a pickle at this point, but you need to resolve this situation so you avoid future issues.  Likely you just need to figure out what your natural charset/collation settings are for the server, the database, and the tables, and make sure those match your MySQL client API default connetion charset.  Then you can set the appropriate settings in the installer to match and get past this.