开发者

Database Collation difference UTF? Latin? etc.?

What is the collation usage for a database? Well for 开发者_StackOverflow中文版HTML UTF-8 I know a bit, like for displaying other language type. But what about for a database? I'm using latin-1 (default), my friends told me to use UTF instead. When I ask why, they don't know and say that others use it. So I'm questioning what does collation really do? Does it affect speed or something like that?


MySQL confuses the issue by having collations named after character encodings. They're separate concepts.

A collation determines how the relational operators (<, >, etc.) and ORDER BY clauses sort strings. Issues considered by collations are:

  • Are uppercase and lowercase letters considered equivalent?
  • Is whitespace significant?
  • Do accented letters sort equal to the unaccented versions, after the unaccented versions, or at the end?
  • Are digraphs like "ch" and "ll" sorted like separate letters?
  • Are Unicode compatibility equivalents like AᴬⒶA
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜