[Mono-devel-list] String compare changes

Bernie Solomon bernard at ugsolutions.com
Tue Dec 2 19:47:23 EST 2003


I haven't been able to do much for a bit so catching up on changes... in the
latest
code there seems to be a problem with IndexOf when using ICU.
In particular Reflection.Emit.TypeBuilder does an IndexOf((char)0) which
generates a warning message from locales.c. I am not sure what the right
way of handling this is as yet from what I've looked at (and I am not
sure if the icu stuff handles embedded nulls - though MS's implementation
seems to).

Also the code seems to do some (in my view) unnecessary conversions
from the mono string format to UChar which could be more efficient.

I believe UChar == gunichar2 == platform endian unicode character
so none of these conversions are necessary and pointers into the
MonoString itself can be used to feed into the collation routines. (UChar
is documented as 16 bit and I presume gunichar2 is too).

Anyway that's what I've noticed - and it looks like this needs something
doing to it (thought I'd email this early though will see what might
be possible as I get time if it isn't fixed already...)

Bernie Solomon




More information about the Mono-devel-list mailing list