文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 66%

12.10.2 西欧字符集12.10.2 West European Character Sets

西欧字符集涵盖大多数西欧语言,例如法语、西班牙语、加泰罗尼亚语、巴斯克语、葡萄牙语、意大利语、阿尔巴尼亚语、荷兰语、德语、丹麦语、瑞典语、挪威语、芬兰语、法罗语、冰岛语、爱尔兰语、苏格兰语和英语。Western European character sets cover most West European languages, such as French, Spanish, Catalan, Basque, Portuguese, Italian, Albanian, Dutch, German, Danish, Swedish, Norwegian, Finnish, Faroese, Icelandic, Irish, Scottish, and English.

  • ascii(美国 ASCII)排序规则:ascii (US ASCII) collations:

    • ascii_bin

    • ascii_general_ci(默认)ascii_general_ci (default)

  • cp850(DOS 西欧)排序规则:cp850 (DOS West European) collations:

    • cp850_bin

    • cp850_general_ci(默认)cp850_general_ci (default)

  • dec8(DEC 西欧)排序规则:dec8 (DEC Western European) collations:

    • dec8_bin

    • dec8_swedish_ci(默认)dec8_swedish_ci (default)

    dec 字符集已被弃用;预计将在随后的 MySQL 版本中移除对其的支持。The dec character set is deprecated; expect support for it to be removed in a subsequent MySQL release.

  • hp8(惠普西欧)排序规则:hp8 (HP Western European) collations:

    • hp8_bin

    • hp8_english_ci(默认)hp8_english_ci (default)

    hp8 字符集已被弃用;预计在随后的 MySQL 版本中将移除对其的支持。The hp8 character set is deprecated; expect support for it to be removed in a subsequent MySQL release.

  • latin1(cp1252 西欧)校对规则:latin1 (cp1252 West European) collations:

    • latin1_bin

    • latin1_danish_ci

    • latin1_general_ci

    • latin1_general_cs

    • latin1_german1_ci

    • latin1_german2_ci

    • latin1_spanish_ci

    • latin1_swedish_ci(默认)latin1_swedish_ci (default)

    MySQL's latin1 is the same as the Windows cp1252 character set. This means it is the same as the official ISO 8859-1 or IANA (Internet Assigned Numbers Authority) latin1, except that IANA latin1 treats the code points between 0x80以及0x9f as “undefined,” whereas cp1252, and therefore MySQL's latin1, assign characters for those positions. For example, 0x80 is the Euro sign. For the “undefined” entries in cp1252, MySQL translates 0x81 to Unicode 0x0081, 0x8d到0x008d, 0x8f到0x008f, 0x90到0x0090,以及0x9d到0x009d.MySQL's latin1 is the same as the Windows cp1252 character set. This means it is the same as the official ISO 8859-1 or IANA (Internet Assigned Numbers Authority) latin1, except that IANA latin1 treats the code points between 0x80 and 0x9f as “undefined,” whereas cp1252, and therefore MySQL's latin1, assign characters for those positions. For example, 0x80 is the Euro sign. For the “undefined” entries in cp1252, MySQL translates 0x81 to Unicode 0x0081, 0x8d to 0x008d, 0x8f to 0x008f, 0x90 to 0x0090, and 0x9d to 0x009d.

    latin1_swedish_ci 排序规则是默认规则,可能是大多数 MySQL 用户使用的。虽然人们经常说它是基于瑞典/芬兰的排序规则,但也有瑞典人和芬兰人不同意这一说法。The latin1_swedish_ci collation is the default that probably is used by the majority of MySQL customers. Although it is frequently said that it is based on the Swedish/Finnish collation rules, there are Swedes and Finns who disagree with this statement.

    latin1_german1_ci 和 latin1_german2_ci 排序规则基于 DIN-1 和 DIN-2 标准,其中 DIN 代表 Deutsches Institut für Normung(德国的 ANSI 等效机构)。DIN-1 被称为 “字典排序”,而 DIN-2 被称为 “电话簿排序”。有关这种排序在比较或搜索时的效果示例,请参见 第 12.8.6 节,“排序效果示例”。The latin1_german1_ci and latin1_german2_ci collations are based on the DIN-1 and DIN-2 standards, where DIN stands for Deutsches Institut für Normung (the German equivalent of ANSI). DIN-1 is called the “dictionary collation” and DIN-2 is called the “phone book collation.” For an example of the effect this has in comparisons or when doing searches, see Section 12.8.6, “Examples of the Effect of Collation”.

    • latin1_german1_ci(字典)规则:latin1_german1_ci (dictionary) rules:

      Ä = A
      Ö = O
      Ü = U
      ß = s
      
    • latin1_german2_ci(电话簿)规则:latin1_german2_ci (phone-book) rules:

      Ä = AE
      Ö = OE
      Ü = UE
      ß = ss
      

    在 latin1_spanish_ci 排序规则中,ñ(n-波浪号)是位于 n 和 o 之间的独立字母。In the latin1_spanish_ci collation, ñ (n-tilde) is a separate letter between n and o.

  • macroman(Mac 西欧)排序规则:macroman (Mac West European) collations:

    • macroman_bin

    • macroman_general_ci(默认)macroman_general_ci (default)

    macroroman 已弃用;预计在后续 MySQL 版本中会移除对它的支持。macroroman is deprecated; expect support for it to be removed in a subsequent MySQL release.

  • swe7(7 位瑞典语)排序规则:swe7 (7bit Swedish) collations:

    • swe7_bin

    • swe7_swedish_ci(默认)swe7_swedish_ci (default)