We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5528
    • 14 Posts
    This is my test site: http://yhact.com/cms/

    I am setting up a multi-lingual site in Eng and Chinese, have been having difficulties trying to get the Alax search from result to display Chinese characters properly. huh

    Type "yhact" in the search form, you will see the Chinese characters doesn’t show up correctly. The search form doesn’t accept search for chinese characters either... whenever I type anything in chinese it returns as "no results found"...

    Could anyone please tell me which file and code should I tweak to fix this bug, please help!

    Thanks in advance wink
      • 5811
      • 1,717 Posts
      miao cmku

      i look at your source code and it seems that you use the 1.6.1 version. You use UTF-8 as page character set but what is you mysql database character set ? is it also UTF-8 or an other character set.

      Could you check that your $database_connection_charset variable in the file /manager/includes/config.inc.php is correct. This variable should contains the connection charset of your mysql base (utf-8, latin1, ...) .

      And look at http://modxcms.com/forums/index.php/topic,5357.301 to download the last 1.6.2 version

      If not solved let me know
        • 5528
        • 14 Posts
        smiley coroico,

        Thank you so much!! It works now.

        You have made my day whole lot brighter now grin

        Cheers
          • 5528
          • 14 Posts
          hi coroico, i have another question regarding the AjaxSearch. I have another site hosted with Godaddy, on a shared server, and they have limited/disabled the ’php_mbstring.dll extension’, and AjaxSearch needs this turned on to work.

          I am wondering if there is any other way to have the AjaxSearch work without turning the ’php_mbstring.dll extension’ on?

          Thanks again!!!
            • 5811
            • 1,717 Posts
            Hi cmku

            Which character set do you use for your database ?
              • 5528
              • 14 Posts
              hello, the character encoding i use is UTF-8 for all of my sites.

              I have a few sites hosted with Godaddy shared server, and I have only realized that they turn the ’php_mbstring.dll’ off~~~ the test site i am building is http://jaguartech.com.tw

              thanks for your quick reply!
                • 22303 MODX Staff
                • 10,725 Posts
                That’s a curious extension for them to leave out. I see it as required in more and more projects as internationalization becomes more and more important...
                  • 5811
                  • 1,717 Posts
                  Hi cmku

                  If your database charset and your pages are all in UTF-8, normally you do not use the phb.mbstring extension, but ...

                  This extension is used to convert the searchstring from UTF-8 to the database charset. I will look at this trouble and try to deliver a new version that takes into account of that. But i need some time to do that smiley and collect some others requests.
                    • 5528
                    • 14 Posts
                    hi coroico,

                    I have set my database to UTF-8 (in my config.inc.php), and my template to UTF-8, but the search result still pop-up "php mbstring extension required".

                    This is what GoDaddy support said: "Dear Sir/Madam, Thank you for contacting online support. No, we only allow the php_mbstring.dll extension is only available with Dedicated and Virtual Dedicated server accounts. If you wish to have this feature you will need to upgrade to a virtual dedicated or dedicated server."

                    Thanks for your support, I really look forward to the new version, as AjaxSearch Rocks!

                    Have a good one

                    Joseph
                      • 5811
                      • 1,717 Posts
                      Hi Cmku,

                      Please find enclosed a fix to solve the mbstring extension issue. Unzip the file and overwrite the AjaxSearch.php file of the snippet folder with this new version. Your Ajaxsearch snippet document doesn’t need to be upgraded.

                      This a simple fix, not a new version. It works only when pages and database are in UTF-8.
                      This fix will be included in the new version (1.6.3) in preparation (but with no known delivery date grin )

                      Let me know if your issue is now corrected