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

Konstantin Triger kostat at mainsoft.com
Tue Jun 7 03:33:48 EDT 2005


Hi Eno,

The CompareOrdinal does not have a case insensitive overload. So you 
cannot use it instead of string.Compare(s1,s2,true).

Regards,
Konstantin Triger



Atsushi Eno wrote:

> Hi,
>
> This is offtopic (I've replied for the main story yet), but
>
> > +                if (string.Compare(attribute, value, true) == 0)
> > +                    return;
>
> you'd like to be careful to use String.Compare() since it is
> culture-sensitive comparison by default. In that case,
> CompareOrdinal() leads you to the right way.
>
> We don't use collation now but it will be supported in the
> near future (I hope ;-)
>
> Maybe I need to audit those culture-sensitive things on all
> the libraries, including sys.xml (I once did in response
> to Jackson's advisory but I think we need further check).
>
> Atsushi Eno
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list