Re: strcasecmp/tolower/toupper breakage



On 04 May 2001 00:06:21 -0400, Havoc Pennington wrote:
> It's far worse than you think - strcoll() doesn't work on
> UTF-8. What's needed is a UTF-8 strcoll() implementation.
> 
> We punted this out of glib 2, it's really hard to implement. :-(
> 
> The cheesy way is to setlocale() to current locale, convert the
> strings to locale encoding, compare, restore locale. But it's not
> thread safe and it's butt slow. So not really acceptable.

This sounds like a tough way to do this to me, but it may be the only
way.  What if we just take the code for doing strcoll out of glibc and
write utf8_strcoll?  It would just use all the locale specific
information we can find in glibc.

I'm not sure how glibc is set up to be expansible with respect to things
like strcoll, but we could take a look at doing it similarly.

Thanks,
    Chris


_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]