C#中的完整字符串比较规则

发布于 2025-02-11 20:18:21 字数 410 浏览 2 评论 0原文

我在哪里可以找到C#中某种文化的确切而完整的字符串比较规则?
例子: 使用stringcomparer.invariantculture字符串“ masse”和“maße”相等。
需要有规则列表。

也有类似的问题,例如:
不变式colliantculture and ordinal string string string和ordinal字符串比较


这解释了概念并举例说明了例子。但是我想拥有定义实际规则的来源。

Where do I find the exact and complete string comparison rules for a certain culture in C#?
Example:
With StringComparer.InvariantCulture the strings "Masse" and "Maße" are equal.
There needs to be list of rules.

There have been similar questions, like:
Difference between InvariantCulture and Ordinal string comparison
This explains the concepts and gives examples. But I would like to have the source where the actual rules are defined.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅沫记忆 2025-02-18 20:18:21

对于C#,这在历史上取决于C#的版本和风味以及您正在运行的操作系统的变化。

奥利维尔(Olivier)的评论是最新信息来源:行为会发生变化。

我希望基于ICU的所有平台上的C#统一将是稳定的。

ICU是由来自

For C#, this has historically varied depending on which version and flavor of C# and what OS you're running on.

Olivier's comment is an excellent current source of information: Behavior changes when comparing strings on .NET 5+.

I expect this unification of C# on all platforms based on ICU to be stable.

ICU is an API that is driven by data from the Unicode CLDR project. So the precise mappings and equivalences in your example are ultimately derived from CLDR.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文