C# 中的文化敏感比较不考虑“可忽略的字符”:
Character sets include ignorable characters. The Compare(String, String) method does not consider such characters when it performs a culture-sensitive comparison. For example, a culture-sensitive comparison of "animal" with "ani-mal" (using a soft hyphen, or U+00AD) indicates that the two strings are equivalent, as the following example shows.
我在哪里可以找到此类字符的完整列表以及比较包含可忽略字符的字符串的一些详细信息?
最佳答案
所有 Unicode 代码点都有一个由 Unicode 联盟指定的“默认可忽略”属性;如果可忽略字符的 .NET 概念与该属性的值有任何不同,我会感到非常惊讶。
默认可忽略字符的权威资源是 Unicode 标准,特别是第 5.21 节(link to chapter 5 PDF for Unicode v6.2.0)。
关于c# - 用于字符串比较的可忽略字符列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21454345/