GNU bug report logs - #11786
Use c_strcasecmp for portable ASCII case-insensitive comparison

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Tue, 26 Jun 2012 01:47:08 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 11786 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11786 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu, dmantipov <at> yandex.ru
Subject: Re: bug#11786: Use c_strcasecmp for portable ASCII
	case-insensitive	comparison
Date: Tue, 26 Jun 2012 18:39:02 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Andreas Schwab <schwab <at> linux-m68k.org>
>> Cc: Paul Eggert <eggert <at> cs.ucla.edu>,  Dmitry Antipov <dmantipov <at> yandex.ru>,  11786 <at> debbugs.gnu.org
>> Date: Tue, 26 Jun 2012 18:25:03 +0200
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > Can tolower fail for these, somehow, in a locale that uses a multibyte
>> > encoding for these strings, and if so, can you give a practical
>> > example of such a failure?
>> 
>> tolower ('I') in a turkish locale.
>
> OK, but that's not an issue with multibyte locales.

It's an issue with both tr_TR.ISO-8859-8 and tr_TR.UTF-8.  In the former
case you get a non-ASCII character, in the latter case you get an upper
case character.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 12 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.