Re: g_utf8_collate case sensitivity
- From: Havoc Pennington <hp redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: Owen Taylor <otaylor redhat com>, Dan Winship <danw ximian com>, Gtk Developers <gtk-devel-list gnome org>
- Subject: Re: g_utf8_collate case sensitivity
- Date: 05 Sep 2001 14:52:14 -0400
Darin Adler <darin bentspoon com> writes:
> on 9/5/01 10:52 AM, Owen Taylor at otaylor redhat com wrote:
>
> >> g_utf8_collate sorts ASCIIbetically case-sensitively (eg, 'Z' < 'a').
> >> That's a bug, right? (The docs say "Compares two strings for ordering
> >> using the linguistically correct rules for the current locale". I think
> >> the rules for my locale say that "bar" sorts before "Foo".)
> >
> > The rules for the C locale generally have strcmp() ordering, I think.
> >
> > g_utf8_collate() is just implemented in terms of strcoll() currently.
>
> For this very reason, eel_strcoll uses strcoll outside "C" and "POSIX"
> locales, but uses eel_strcmp_case_breaks_ties in the "C" and "POSIX"
> locales.
>
> It looks like we're still going to need an eel_strcoll (although we'll
> switch to g_utf8_collate and a UTF-8 version of
> eel_strcmp_case_breaks_ties).
>
> Frankly, I'd strongly suggest providing a function with these kinds of
> semantics in glib -- it was my mistake not to bring this up when my remarks
> suggested g_utf8_collate.
>
Of course, no one should be using the C locale anyhow...
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]