I’m having a difficult time sorting a char field in MySQL. The problem is that accented characters get mixed up with un-accented characters. For example:
Abc
Ábd
Acc
I thought it may have something to do with collation. So I changed the collation of my table to utf8-ut8_bin, after reading this post. Actually, I altered the table several times to various collations. No cigar.
I should also add that, I don’t mind the order of the sort as long as the sort doesn’t result in a mixed list. In other words, this is fine:
Ábd
Abc
Acc
and so is this:
Abc
Acc
Ábd
Looking forward to your response.
You just need to use a case-sensitive collation, for example:
utf8_general_cs.UPD
I am sorry, it seems there is no
utf8_general_cs,utf8_binshould work though.And you should change the collation of the specific field instead of that of the table (or be sure that the field does use the table defaults).