We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3785
    • 143 Posts
    Alright I downloaded the linked MODx version and did the test: I updated an existing 0.9.6.2 installation. Unfortunately it does not work, russian characters did not work before and after the installation. The strange thing is, that although in the system-info the database enconding is shown to be:
    Datenbank-Charset		 utf8
    Datenbank-Collation-Charset	 utf8_general_ci
    


    ... when I do a dump of the database using the MODx backup tool the tables are created in latin1 enconding:
    CREATE TABLE `modx_active_users` (
      `internalKey` int(9) NOT NULL default '0',
      `username` varchar(50) NOT NULL default '',
      `lasthit` int(20) NOT NULL default '0',
      `id` int(10) default NULL,
      `action` varchar(10) NOT NULL default '',
      `ip` varchar(20) NOT NULL default '',
      PRIMARY KEY  (`internalKey`)
    ) ENGINE=MyISAM DEFAULT [b]CHARSET=latin1[/b] COMMENT='Contains data about active users.';
      Medianotions – Studio für Webdesign
      http://www.medianotions.de
      • 22303 MODX Staff
      • 10,725 Posts
      Sounds like the MODx backup tool is showing you the problem, that your tables are in the wrong collation for the database container.
        • 3785
        • 143 Posts
        Yes they are indeed, but in older versions of MODx I didn’t have to care about this. I told MODx in the configuration that I want to use utf8 encoding and although my database tables where encoded latin1_swedish_collation special characters beyond latin1 worked (I tried this just for curiosity with an old 0.9.5 installation of mine).

        Since 0.9.6.2 the problems appeared and I think there should be a help text for those which doesn’t know much about encoding to help them figure out things. Maybe the installer could check the encoding of the database if its an upgrade and post a warning if the database tables are not utf8?
          Medianotions – Studio für Webdesign
          http://www.medianotions.de
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: Bogdan at Dec 19, 2008, 11:57 AM

          Yes they are indeed, but in older versions of MODx I didn’t have to care about this. I told MODx in the configuration that I want to use utf8 encoding and although my database tables where encoded latin1_swedish_collation special characters beyond latin1 worked (I tried this just for curiosity with an old 0.9.5 installation of mine).
          This is likely the result of the server connection charset being set to latin1, so it just worked before even though your database container was improperly identifying the collation of the tables it contained. With the introduction of SET NAMES/SET CHARACTER SET feature, it is imperative that your database configuration be consistent with the data it already contains.

          Quote from: Bogdan at Dec 19, 2008, 11:57 AM

          Since 0.9.6.2 the problems appeared and I think there should be a help text for those which doesn’t know much about encoding to help them figure out things. Maybe the installer could check the encoding of the database if its an upgrade and post a warning if the database tables are not utf8?
          I for one still don’t completely understand all the implications and possible scenarios causing problems here, but there have been many and they are confusing for sure, even to me. And it does check the encoding of the database, but in your case, it thought it was fine, cause the database was reporting utf8. Checking every table’s collation to see if it matches is a bit excessive IMO, but that’s the only other thing I see that could be done to warn folks...
            • 3749
            • 24,544 Posts
            Quote from: OpenGeek at Dec 19, 2008, 12:03 PM

            Checking every table’s collation to see if it matches is a bit excessive IMO, but that’s the only other thing I see that could be done to warn folks...

            We could check the site_content table (and maybe the pagetitle, longtitle, and content field inside that table). Those would be most likely to cause trouble and I think most users will have the same encoding throughout the DB.

              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