Re: g_utf8_collate case sensitivity
- From: Dan Winship <danw ximian com>
- To: Owen Taylor <otaylor redhat com>
- Cc: Darin Adler <darin bentspoon com>, Gtk Developers <gtk-devel-list gnome org>
- Subject: Re: g_utf8_collate case sensitivity
- Date: 06 Sep 2001 12:30:39 -0400
> I feel a bit uncomfortable second-guessing strcoll() because:
>
> - maybe strcoll() in the C locale is implemented to do
> something smarter than strcmp().
I just checked the UNIX98 spec. It's defined to collate as US-ASCII for
US-ASCII strings, and undefined for 8-bit data:
http://www.opengroup.org/onlinepubs/007908799/xbd/locale.html#tag_005_003_002_005
> - g_utf8_casefold() isn't exactly speedy.
So how about adding g_utf8_strcasecmp() that uses casefold_table[]
directly, so it doesn't need to malloc, and can stop folding once the
strings stop matching? And then make g_utf8_collate use that for
C/POSIX.
If that's an ok solution, I'll write the code.
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]