【发布时间】:2020-11-05 08:19:45
【问题描述】:
一些 mongoDB 语言环境有变体:例如,加泰罗尼亚语有变体 search,西班牙语有变体 search 和 traditional。这些变体是什么意思,它们对字符串比较有什么影响? MongoDB 文档指定了每种支持的语言可用的变体(请参阅this page from their maunal),但没有说明它们的含义。
【问题讨论】:
一些 mongoDB 语言环境有变体:例如,加泰罗尼亚语有变体 search,西班牙语有变体 search 和 traditional。这些变体是什么意思,它们对字符串比较有什么影响? MongoDB 文档指定了每种支持的语言可用的变体(请参阅this page from their maunal),但没有说明它们的含义。
【问题讨论】:
排序规则数据来自CLDR - Unicode Common Locale Data Repository。
下载common archive并寻找ca语言环境(common/collation/ca.xml),它有以下注释。标准变体:
<!-- standard collation &L<<ŀ=l·<<<Ŀ=L· is equivalent to root collation order
(except root uses prefix rules for the middle dot, rather than contractions)
references="Enciclopèdia Catalana: Diccionari de la llengua catalana ISBN 84-85194-46-2" -->
搜索变体:
# Below are the rules specific to ca.
# Per Apple language group, these are modified from standard rules below
# to make L primary-different from L-dot for search.
【讨论】: