The following C# code returns false when using .NET 6 which uses the ICU library for its string comparisons:
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-de");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-de");
"ß".Equals("SS", StringComparison.CurrentCultureIgnoreCase); // false with ICU
From my understanding this should be true based on the Unicode case folding rules (and also – somewhat more importantly – standard German orthographic rules):
00DF; F; 0073 0073; # LATIN SMALL LETTER SHARP S
(CaseFolding.txt)
When using the legacy Microsoft NLS implementation, the above code returns true.
So why does the ICU library used by .NET 6 differ from the Unicode standard or is my understanding of the standard incorrect here?
Original C# question that lead to this.
6