This is the mail archive of the
libc-locales@sourceware.org
mailing list for the GNU libc locales project.
Re: Weird case-insensitive collation
- From: ludovic dot courtes at laas dot fr (Ludovic Courtès)
- To: Reshat Sabiq (Reşat)<tatar dot iqtelif dot i18n at gmail dot com>
- Cc: libc-locales at sources dot redhat dot com
- Date: Mon, 23 Oct 2006 10:38:13 +0200
- Subject: Re: Weird case-insensitive collation
- Organization: LAAS-CNRS
- References: <87k62w1r7f.fsf@laas.fr> <45381092.2070401@gmail.com>
Hi,
"Reshat Sabiq (Reşat)" <tatar.iqtelif.i18n@gmail.com> writes:
> I think this function is not locale-aware, so it compares characters'
> integral value, which naturally produces a positive.
> http://opengroup.org/onlinepubs/007908799/xsh/strcasecmp.html
> In the POSIX locale, strcasecmp() and strncasecmp() do upper to lower
> conversions, then a byte comparison. The results are unspecified in
> other locales.
It occurred to me that I had not payed enough attention to that last
sentence from POSIX, sorry about that.
Still, I find it confusing that the glibc manual specifies (using an
example) the behavior of `strcasecmp ()' with other locales.
Thanks,
Ludovic.