2

In MySQL, certain characters are considered the same when performing searches, e.g. 'n' and 'ñ'; unless you specify BINARY in the condition.

Is there a list somewhere of the characters that are considered the same?

2 Answers 2

3

Case or accent sensitivity behavior is defined by the collation you are using.

The full list of comparable characters in a given collation can be found in collationcharts where you find the MySQL list of collations

If you find your collation in that list you will see a chart of comparable characters.

0
3

Here is a summary of the utf8 collations: http://mysql.rjweb.org/utf8_collations.html

It shows that 'n' and 'ñ' are considered equal for all but utf8_bin, utf8_spanish2_ci, and utf8_spanish_ci In the Spanish cases, Ñ and ñ are treated like a separate letter and sort after nz and before o.

(Latvian and Polish have a couple of flavors of n that work like the Spanish ñ; but perhaps that is in of importance to you.)

2
  • Oh... I did not check to see whether "combining tilde" (hex CC83) plus "n" is equal. I'm pretty sure it is for utf8_unicode_ci but not utf8_general_ci; don't know about utf8_spanish*.
    – Rick James
    Commented Dec 12, 2015 at 22:30
  • I got frustrated trying to understand /mysql60/, so I wrote code to generate my page.
    – Rick James
    Commented Dec 12, 2015 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.