We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Quote from: FuryDE at Sep 29, 2008, 04:42 PM

    How do I use such a patch?
    Simply lookup "diff" and "patch" for your relevant platform; there should be plenty of information on working with/applying patches out there.

    Or get the latest from Subversion and you’ll have the patched code without having to apply it manually.
      • 10313
      • 375 Posts
      Okay, thanks for the hint. Usually I would search before asking, I don’t know why I didn’t yesterday smiley

      Martin
        • 10313
        • 375 Posts
        I don’t wanna bug you, but the above link (as all links to svn) are not working. Yesterday evening (german time) it was okay, but now I only get "404" errors.

        Is the SVN system down at the moment?

        Martin
          • 10449
          • 956 Posts
            • 18086
            • 2 Posts
            Quote from: Lammikko at Sep 18, 2008, 05:11 AM

            After further investigation I have found that in my case all I need is actually this fix:

            manager\includes\extenders\dbapi.mysql.class.inc.php line 80

            Add before line "global $modx;"

            global $database_connection_method;


            This brings back my accented characters on document titles.

            Just to be helpful: the given above method helped me in the similar problem with polish national characters.
              • 15001
              • 697 Posts
              Well, I played a little bit with this problem of accented characters tonight as I have reasons to think that solving the problem is not so simple.

              My configuration is so that language is French and the encoding that I selected for the manager is Western European (ISO), i.e. iso-8859-1.

              What I observed is that the selected encoding (in my case iso-8859-1) is used by MODx to tell the browser which encoding it must use by default to display the page, by using a meta tag :
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


              For the manager interface, but not only. Also for the documents that MODx generates.

              An interesting behavior that I could observe is the following :


              • Accented characters don’t display correctly until I select manually the UTF-8 encoding in the browser.
                (This makes me think that I use a language file stored in utf-8.
                There is maybe an alternative ressource stored in iso-8859-1.)
              • As long as I keep the same encoding in the browser (utf-8), the accented characters stored in the title and in the document content display correctly after saving, and also when a preview of the document is done inside MODx manager.
              • When the site is previewed (i.e. opened in a new tab if using Firefox 3) and the page accessed, display problem appears as the <meta> that selects iso-8859-1 is printed in the page header, while the document content is written in utf-8.

              To summarize, the text of MODx interface was stored in utf-8 and new documents are also stored in utf-8.
              Selecting a différent charset in the Configuration prints this charset in the header of generated documents but does not change the way that characters are stored in the MySQL database which remains in utf-8. Maybe I’m wrong; its my 2 penny worth theory.

              As suggested above by one of you, I added
              global $database_connection_method;
              before
              global $modx;
              in file dbapi.mysql.class.inc.php, line 80 (i.e. function connect).

              This solved the problem of characters that were bad displayed in the title textfield and content area when a document was saved and edited again.

              However, I’m not sure if the characters were bad stored or just bad displayed when reediting the document.
              The observations above let me think that the storage remains in utf-8 and that it was just a display problem.

              The opinion of MODx developpers or other MODx experts would be very useful to better understand what happens.

              Thanks.






                • 15001
                • 697 Posts
                For those amongst you who know French, there is an excellent document about charsets and collations which helped me a lot to understand what happens: http://antoun.developpez.com/mysql5/jeux-collations/Jeux_et_Collations.pdf

                When installing MODx, on can choose the wanted collation after clicking the link that tests the connection to the server.



                  • 16429
                  • 254 Posts
                  It fixed my problems, too.
                  (All configurated to utf-8 but still reporting accented chars as "ì" or "ò")
                    kudo
                    www.kudolink.com - webdesign (surprised?)

                    [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Quote from: Jul at Oct 18, 2008, 10:04 AM

                    For those amongst you who know French, there is an excellent document about charsets and collations which helped me a lot to understand what happens: http://antoun.developpez.com/mysql5/jeux-collations/Jeux_et_Collations.pdf

                    When installing MODx, on can choose the wanted collation after clicking the link that tests the connection to the server.

                    Would anyone care to translate that into English? Charsets/collations are a very tricky subject and we’d like to offer some additional information to help folks get this critical piece of setting up a site correctly.
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 15001
                      • 697 Posts
                      Would anyone care to translate that into English?

                      Just to remember : authors have copyright over their documents, and keep their rights for possible translations.

                      More, this document http://antoun.developpez.com/mysql5/jeux-collations/Jeux_et_Collations.pdf is a chapter from a book, as mentioned by Mr Dinimant :
                      Cet article est extrait du Guide complet MySQL 5, (éditions MicroApplication) et adapté par l’auteur pour
                      Developpez.com, avec l’autorisation de l’éditeur.

                      Translation:
                      This paper is from the Complete MySQL 5 Guide (Microapplication Editions) and adapted by the author for Developpez.com, with permission from the editor.

                      So, for translation, you should first ask permission to Mr Antoine Dinimant who probably will also have to ask permission to Microapplication.

                      As for MODx, I remember that I chose a iso-8859-1 (latin-1) compatible collation for the database and also this charset (i.e. Western European) as default charset for the pages. This works perfectly.