为什么 MySQL 的默认排序规则是 latin1_swedish_ci?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6769901/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 20:34:26  来源:igfitidea点击:

Why is MySQL's default collation latin1_swedish_ci?

mysqlcollation

提问by Alan

What is the reasoning behind setting latin1_swedish_cias the compiled default when other options seem much more reasonable, like latin1_general_cior utf8_general_ci?

latin1_swedish_ci当其他选项看起来更合理时,例如latin1_general_ci或时,将其设置为编译默认值背后的原因是什么utf8_general_ci

采纳答案by gbn

The bloke who wrote itwas co-head of a Swedish company.

写这篇文章的人是一家瑞典公司的联席主管。

Possibly for similar reasons, Microsoft SQL Server's default language us_english.

可能出于类似的原因,Microsoft SQL Server 的默认语言为 us_english。

回答by Ariel

latin1_swedish_ciis a single byte character set, unlike utf8_general_ci.

latin1_swedish_ci是单字节字符集,与utf8_general_ci.

Compared to latin1_general_ciit has support for a variety of extra characters used in European languages. So it's a best choice if you don't know what language you will be using, if you are constrained to use only single byte character sets.

相比之下,latin1_general_ci它支持欧洲语言中使用的各种额外字符。因此,如果您不知道将使用哪种语言,如果您被限制为只能使用单字节字符集,那么这是一个最佳选择。