We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8537
    • 26 Posts
    Hello,

    I’m not very familiar with collation, but I would like to initialyse my MODX environment in a proper way.

    I’m going to use MODX with French and Japanese languages, that means :
    - being able to use accentuated caracters for French (ie : àéï)
    - being able to use Japanese Caracters (ie : あえい)

    What collation should I use huh : utf8_general_ci or utf8_unicode_ci or something else ? what’s the difference ?

    Thank you for your help smiley
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      This might be a better place to find out more about MySQL collation sets
      http://forums.mysql.com/list.php?103
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 22851
        • 805 Posts
        The following multilingual site (English, French, Japanese) runs utf8_unicode_ci: http://nashi.podzone.org/

        As I understand it, the collation tells mysql which characters to treat as being the same when doing string comparisons. With the utf8_unicode_ci collation each unicode character is treated as completely independent. So two strings will only match if they are exactly the same. A database operation which involves string comparisons like the following:
        WHERE 'abc'='abc'

        where the first string is written using Japanese full width alphanumeric characters and the string on the right is written using plain latin characters, will return FALSE. If you are using utf8_general_ci however, then the two strings might be considered equal and the query might return TRUE.

        Hope that helps.

        (Shamless plug: If you are thinking of developing a multilingual website, you might want to consider using YAMS).
          YAMS: Yet Another Multilingual Solution for MODx
          YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
          Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
          • 8537
          • 26 Posts
          Thank you very much, this is exactly what I was looking for !! smiley