MySQL: Charset, Collation and UCA
This note is about sorting or filtering characters.
Collations
Collations like utf8mb4_unicode_520_ci and utf8mb4_0900_ai_ci are based on Unicode Collation Algorithm (UCA). The number in the collation defines the UCA version:
0900
: UCA Version 9.0.0 http://www.unicode.org/Public/UCA/9.0.0/allkeys.txt520
: UCA Version 5.2.0 http://www.unicode.org/Public/UCA/5.2.0/allkeys.txt
Case and accent sensitive:
ci
: case insensitive.cs
: case sensitiveai
: accent insensitiveas
: accent sensitive
Sample snippet code
Read more
https://lefred.be/content/mysql-character-sets-unicode-and-uca-compliant-collations/
Last updated