Reputation: 6030
I have an InnoDB
table in mysql with utf8
charset and utf8_general_ci
collation.
After the following query:
SELECT * FROM `ticket`
WHERE `text` LIKE '%abc%'
ORDER BY `created_date` DESC
it returns me the rows containing "äbc" as well as containing "abc". I've tried to use utf8_bin
collation on table, but it didn't helped.
What I've missed?
P.S. I thought that the problem is in the PHP connection charset, but after executing the query on Sequel Pro, I've got the same result.
Upvotes: 2
Views: 1276
Reputation: 769
for the unicode collation (both utf8_general_ci and utf8_unicode_ci) you have this kind of equalities:
Ä = A
Ö = O
Ü = U
this is not a bug.
read this http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html and this http://dev.mysql.com/doc/refman/5.0/en/charset-collation-effect.html
Upvotes: 3