We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9130
    • 171 Posts
    I’m running a modx site in Hebrew using UTF8 encoding for the site and database but I’m having problems with user signup/login.

    Some users signup with English usernames and some choose usernames using Hebrew characters, the English ones work fine but the Hebrew ones are giving me problems. When a user signs up with a Hebrew user name the system seems to work OK, the user gets his confirmation email (including the correct name) and the information is displayed correctly in the manage web users section of the manager, unfortunately when it comes to actually logging the user in things seem to go sour.
    When trying to log in the Hebrew named users get the pop up message "Incorrect username or password entered!" which is originating from the login snippet file weblogin.processor.inc.php line 202. It seems that the corresponding sql query (line 198) does not return any matching user names and hence the problem. Also for what its worth ,the names don’t appear correctly in phpMyAdmin.

    I’ve tried adding a ’SET NAMES utf8’ sql command to the web signup process (websignup.inc.php line 107) just before the new user is inserted into the database. This helped to some extent as now new Hebrew users are able to sign in but the new names don’t display correctly in the manager huh.

    Last but not least I have to get this to work with the SMF connector module, again the English users work fine with SMF, but for every Hebrew user in modx two new users are created on the SMF system both with similar garbled names. After the ’SET NAMES’ change things are ever worse and for every Hebrew user in modx three new users are created on the SMF system, again with garbled names and of course logging in to modx using these user names does not log into the SMF forum. My SMF forum is also running using utf8 encoding for both the site and the database.

    Can anyone point me in the right direction here? Any help would be appreciated.

    Erez
      • 22815
      • 1,097 Posts
      Could this possibly be related to the case-sensitive login issue? I haven’t got the files to hand, but if the word BINARY is in the SQL query, try taking it out.

      I may be completely wrong here, but the essence is that MySQL will be slightly more forgiving if you take it out.
        No, I don't know what OpenGeek's saying half the time either.
        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
        Forum: Where to post threads about add-ons | Forum Rules
        Like MODx? donate (and/or share your resources)
        Like me? See my Amazon wishlist
        MODx "Most Promising CMS" - so appropriate!
        • 9130
        • 171 Posts
        Thanks, but I already found the answer and I was able to solve this using the methods described in this thread:
        http://modxcms.com/forums/index.php/topic,7023.0.html

        One problem remains, it seems that the data in the modx database was not really stored using UTF8 (although the collation is UTF8) so now I have to find a way to convert it somehow.
          • 36451
          • 264 Posts
          Quote from: etal at Sep 10, 2006, 05:18 PM

          One problem remains, it seems that the data in the modx database was not really stored using UTF8 (although the collation is UTF8) so now I have to find a way to convert it somehow.

          Maybe it’s the editor who fails here. In case you use TinyMCE you can change the way it stores your input by changing
          entity_encoding : "named",
          to
          entity_encoding : "raw",
          in Resources -> Plugins -> TinyMCE. See details in Moxiecode’s documentation. This small change will result in plain characters in the database.

          Maybe that helps.