[Mono-list] Bug in Mono's String.CompareOrdinal
Gonzalo Paniagua Javier
gonzalo@ximian.com
12 Jan 2003 13:06:39 +0100
El dom, 12-01-2003 a las 00:36, Rhys Weatherley escribió:
> Came across this one while trying to figure out why pnet-compiled switch
> statements using strings didn't work with mono's runtime. It is related to
> some Qt# interoperability issues.
>
> The following program gives -1 under Mono, even though 'a' is greater than 'A'
> from an ordinal point of view (0x0061 > 0x0041). Pnet gives 1, and MS gives
> 32 (any positive value is acceptable as an answer).
>
> The reason why this breaks interoperability is because pnet uses
> "String.CompareOrdinal" to build a binary search tree for switch statements
> that use string arguments rather than use cascading ifs on intern'ed strings
> like csc and mcs.
Right.
Patrik fixed it a few hours ago.
Cheers.
-Gonzalo