bug-bash
[Top][All Lists]
Advanced

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

Re: Incorrect behaviour in glob expansion in bash 2.05b.


From: Chet Ramey
Subject: Re: Incorrect behaviour in glob expansion in bash 2.05b.
Date: Wed, 07 Jan 2004 12:12:04 -0500
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5.1) Gecko/20031120

Jakub Travnik wrote:
Hello,

I have found the culprit. It is pretty brain dead behaviour depending
on locales (just unsetting LANG inside bash doesn't help):
        [...]
Comment in fnmatch.c explains that:

/* We use strcoll(3) for range comparisons in bracket expressions,
   even though it can have unwanted side effects in locales
   other than POSIX or US.  For instance, in the de locale, [A-Z] matches
   all characters. */


Previous bash versions up to bash-2.04 have different comment:
/* We don't use strcoll(3) for range comparisons in bracket expressions,
   even if we have it, since it can have unwanted side effects in locales
   other than POSIX or US.  For instance, in the de locale, [A-Z] matches
   all characters.  So, for ranges we use ASCII collation, and for
   collating symbol equivalence we use strcoll().  The casts to int are
   to handle tests that use unsigned chars. */

Which seems to be much reasonable.

Read item 13 in the NOTES file in the bash distribution, and question
E9 in the Bash FAQ.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]