我注意到使用MySQL的非英语(波兰语)字符的问题。
I have noticed a problem with "non-english" (polish) characters using MySQL.
查询select'abcde'='ąbćdę'返回1,字符串不等于...
query "select 'abcde'='ąbćdę'" returns "1" and the strings are not equals ...
你能帮我吗? :) thx !!!
could you help me ? :) thx!!!
推荐答案对于utf8_general_ci,它们是相等的(除了ł, MySQL),自5.6以来,你也可以使用utf8_unicode_520_ci来正确处理所有波兰字符。使用utf8_polish_ci将重音和非重音字符视为不同的。
For utf8_general_ci they are equal (with the exception of ł, which is not considered a bug by MySQL), and since 5.6 you can also use utf8_unicode_520_ci which handles all Polish characters correctly. Use utf8_polish_ci to treat accented and unaccented characters as different.
select 'abcde'='ąbćdę' COLLATE utf8_polish_ci >> 0演示不是错误
select 'abcde'='ąbćdę' COLLATE utf8_general_ci >> 1 select 'abcdel'='ąbćdęł' COLLATE utf8_general_ci >> 0请参阅错误报告: bugs.mysql/bug.php?id=9604