skip to Main Content

In mysql when a user tries to add a char entity with containing uppercase of turkish I it gives an error. I searched for the cause and I learned that turkish I is mixed with lower turkish ı and i when lowercasing. Is there any way to use lower turkish ı on mysql? My mysql server is utf8_general and collates with utf8_general_ci. Can windows-1254 may help?

2

Answers


  1. To sum up, you should not use upper turkish I in any of your codes. It conficts with what just you said. Windows1254 sure helps with the issue of confliction.

    Login or Signup to reply.
  2. I would not use the "general" collations in MySQL. They are old and simple-minded.

    What version of MySQL are you using? For older versions, I would use utf8_unicode_520_ci or utf8_turkish_ci.

    Because of the "dotless i" (ı), only the turkish colation works "correctly". (OK, I am not an expert on how dotless i should compare.)

    Looking at http://mysql.rjweb.org/utf8_collations.html , I see these lines of interest:

    utf8_turkish_ci
       I=ı  Ħ=ħ  i=Ì=Í=Î=Ï=ì=í=î=ï=Ĩ=ĩ=Ī=ī=Ĭ=ĭ=Į=į=İ  ij=IJ=ij  iz     J=j=j́=Ĵ=ĵ jz
    utf8_unicode_520_ci 
               I=i=Ì=Í=Î=Ï=ì=í=î=ï=Ĩ=ĩ=Ī=ī=Ĭ=ĭ=Į=į=İ  ij=IJ=ij  iz  ı  J=j=j́=Ĵ=ĵ jz
    utf8_general_ci   
               I=i=Ì=Í=Î=Ï=ì=í=î=ï=Ĩ=ĩ=Ī=ī=Ĭ=ĭ=Į=į=İ=ı  ij    iz     J=j=Ĵ=ĵ   jz  j́
    

    They tell me that the dotless lowercase i compares equal to dotless capital I and before H! But for most other collations the lowercase dotless i compares between all I’s and J’s

    Interestingly the uppercase dotted İ compares equal to most I’s in most collations.

    Meanwhile, the dotted and not, upper and lower I all compare equal in utf8_general_ci.

    I don’t happen to know what happens in windows-1254, but beware.

    When you get to the new default (utf8mb4), there is yet another collation. I don’t know what to make of it. It seems that certain accents collate after certain others:

    utf8mb4_tr_0900_ai_ci 
        I=Ì=Í=Î=Ï=Ĩ=Ī=Ĭ=Į=ı  i=ì=í=î=ï=ĩ=ī=ĭ=į=İ   ij=IJ=ij   iz   J=j=j́=Ĵ=ĵ  jz
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search