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
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.
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:
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: