MySQL - Optimal Collation?
We are starting to get our p开发者_运维问答roduct more internationalized, and we are starting to encounter issues with foreign characters, mostly from Spanish and European (Greek, etc), and are wondering what is the best collation to use for tables that will need to contain these characters? Until now, we always let PHPMyAdmin choose the collation it wants, but we feel we need a bit more control.
Thanks.
utf8_general_ci
is the safe way to go, especially since you're supporting several languages with special characters.
utf8_general_ci
considers all accented characters to be equivalent its accent-less counter part. e é è ë are all the same to utf8_general_ci
so it provides a small performance increase. On the other hand, it isn't as accurate as utf8_unicode_ci
for sorting and might have some trouble with characters like ß or other ligatures.
So basically if you need some precise sorting use utf8_unicode_ci
, otherwise go for utf8_general_ci
.
精彩评论