We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31227
    • 198 Posts
    Hey,
    my db is cp1251, and I use windows-1251 for my html
    I inserted cp1251 into modxcms config, and also added the encoding line in the ajaxsearch snippet
    cp1251 -> windows-1251
    The search is conducted but everything comes out jibberish - and with russian search words.
    ...some flash content, not this). пропустить Недвижимость на Кипре Покупка недвижимости за рубежом сегодня становится все более популярным видом вложения частног...

    what am I doing wrong? thanks!
      Pure MODx sites
      Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
      • 1788
      • 1,103 Posts
      Quote from: Vait at Apr 02, 2008, 03:31 AM

      Hey,
      my db is cp1251, and I use windows-1251 for my html
      I inserted cp1251 into modxcms config, and also added the encoding line in the ajaxsearch snippet
      cp1251 -> windows-1251
      The search is conducted but everything comes out jibberish - and with russian search words.
      ...some flash content, not this). пропустить Недвижимость на Кипре Покупка недвижимости за рубежом сегодня становится все более популярным видом вложения частног...

      what am I doing wrong? thanks!

      http://modxcms.com/forums/index.php/topic,21568.msg133454.html#msg133454
        • 31227
        • 198 Posts
        Quote from: antey at Apr 02, 2008, 04:48 AM

        Quote from: Vait at Apr 02, 2008, 03:31 AM

        Hey,
        my db is cp1251, and I use windows-1251 for my html
        I inserted cp1251 into modxcms config, and also added the encoding line in the ajaxsearch snippet
        cp1251 -> windows-1251
        The search is conducted but everything comes out jibberish - and with russian search words.
        ...some flash content, not this). пропустить Недвижимость на Кипре Покупка недвижимости за рубежом сегодня становится все более популярным видом вложения частног...

        what am I doing wrong? thanks!

        http://modxcms.com/forums/index.php/topic,21568.msg133454.html#msg133454

        unfortunately it is a fix for a utf db, I have a cp1251 db
          Pure MODx sites
          Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
          • 22303 MODX Staff
          • 10,725 Posts
          You cannot render content stored in a non-utf8 charset in the database reliably as UTF-8 on the web site. The db and web characters sets must be compatible. And note that regardless of what you set database_connection_charset to, the actual connection character set for MySQL will be set to that of the database container itself. i.e. if database is latin1, then connection will be latin1, despite you specifying utf8 in database_connection_charset variable.
            • 31227
            • 198 Posts
            Ok, thats understood, the db connection is cp1251, the website is windows-1251, is there a quick fix for this? The interesting thing is that if I put a diff connection such as utf8, the results are not found at all, its just the output that is problematic:(
              Pure MODx sites
              Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
              • 31227
              • 198 Posts
              anyone? huh
                Pure MODx sites
                Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
                • 10313
                • 375 Posts
                Quote from: AndreasE at Feb 15, 2008, 05:37 AM

                It doesnt work couse it mess up my swedish characters åäö/ÅÄÖ

                (Or in some places anyway like some names in the document menu)
                It’s exactly the same here. I have set up a german website. When I installed MODx, I chose UTF8 for character encoding. This setting is also given on the manager configuration page.

                Now I found out that the value for $database_connection_charset was not set (I found it because of ajaxSearch). So I set it to "utf8" and from then on, the menus and pagetiltes with umlauts are wrong. When I set that value back to ’’, all is correct again.

                I can’t understand the relation. I told the database to use utf8 at the very beginning. MODx knows that, too. But if I tell modx in a different place too, I get errors respectively wrong characters on screen.

                Martin