为什么MySQL使用latin1_swedish_ci作为默认值? [英] Why does MySQL use latin1_swedish_ci as the default?
问题描述
通常选择默认值是因为它们是最佳的普遍选择,但在这种情况下,它们似乎并不是他们所做的。
据我所见,latin1是多字节前的默认字符集,它看起来像是继续的,可能是为了向下兼容的原因(例如较旧的CREATE语句未指定排序规则)。
从这里:
什么4.0做了 / p>
MySQL 4.0(及早期版本)仅支持字符集和归一化与单字节字符编码(在服务器级指定)的组合概念。默认值为$ code> latin1 ,它对应于MySQL 4.1中的latin1字符集和
latin1_swedish_ci
的排序规则。
至于为什么 swedish ,我只能猜测是因为MySQL AB是/是瑞典语。我看不到任何其他的选择这个整理的原因,它有一些特定的分类怪癖(ÄÖÜ来自Z我认为),但他们没有国际标准。
Does anyone know why latin1_swedish is the default for MySQL. It would seem to me that UTF-8 would be more compatible right?
Defaults are usually chosen because they are the best universal choice, but in this case it does not seem thats what they did.
As far as I can see, latin1 was the default character set in pre-multibyte times and it looks like that's been continued, probably for reasons of downward compatibility (e.g. for older CREATE statements that didn't specify a collation).
From here:
What 4.0 Did
MySQL 4.0 (and earlier versions) only supported what amounted to a combined notion of the character set and collation with single-byte character encodings, which was specified at the server level. The default was
latin1
, which corresponds to a character set of latin1 and collation oflatin1_swedish_ci
in MySQL 4.1.
As to why swedish, I can only guess that it's because MySQL AB is/was swedish. I can't see any other reason for choosing this collation, it comes with some specific sorting quirks (ÄÖÜ come after Z I think) but they are nowhere near an international standard.
这篇关于为什么MySQL使用latin1_swedish_ci作为默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!