- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
一段时间以来,我一直使用 phpMyAdmin 来管理本地 MySQL 数据库。我开始接受的一件事是我的数据库的正确字符集。我已经确定 UTF-8 是兼容性最好的(因为我的 XHTML 模板作为 UTF-8 使用)但让我感到困惑的一件事是我在 phpMyAdmin 界面中看到的 UTF-8 的各种选项?
我隔离的两个是:
所以我的问题是:MySQL 中 utf8
的 general
和 unicode
变体有什么区别? (我了解到 ci
是不区分大小写的简写)
在这件事上任何帮助将不胜感激。
最佳答案
来自MySQL manual on Unicode Character Sets :
For any Unicode character set, operations performed using the _general_ci collation are faster than those for the _unicode_ci collation. For example, comparisons for the utf8_general_ci collation are faster, but slightly less correct, than comparisons for utf8_unicode_ci. The reason for this is that utf8_unicode_ci supports mappings such as expansions; that is, when one character compares as equal to combinations of other characters. For example, in German and some other languages “
ß
” is equal to “ss
”. utf8_unicode_ci also supports contractions and ignorable characters. utf8_general_ci is a legacy collation that does not support expansions, contractions, or ignorable characters. It can make only one-to-one comparisons between characters.
参见 further information and examples 的引用页.
关于mysql - MySQL 中的 utf8_general_ci 和 utf8_unicode_ci 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3337863/
我是一名优秀的程序员,十分优秀!