[Mono-devel-list] Patch idea for previous message

Kornél Pál kornelpal at hotmail.com
Tue Jun 7 12:56:01 EDT 2005


>> String.Compare ("\u00E6\u0304", "\u01E3")
.NET 1.1 returns -1
> Oops, I mean String.Compare ("A\u0308\u0301", "\u1EA6") .
.NET 1.1 returns 0

I have no idea whether these characters exists in real life. Collations
should be based on the rules of an existing languge and it's quite undefined
how characters not in the language should be sorted. I think this function
is intended to sorting human readable text and not to match case insensitive
file names, user names, element and attribute names, ... And this is why
OrdinalIgnoreCase was introduced in .NET 2.0

Windows XP displays "A\u0308\u0301" as a compound charcter and a separated
accent but both "A\u0308" and "A\u0301" display a single compund character
so this may not be a bug but I'm not experienced in Unicode enough to tell
whether Windows XP should display "A\u0308\u0301" as a single compound
character or .NET should not treat it as a single character. And of course
it is possible that both of these things are allowed by Unicode.

Kornél




More information about the Mono-devel-list mailing list