Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is this a bug in globbing

> > I used a statement 'ls ...' with the pattern 'rc?.d/*[A-Z]'
> > and got lots of names with 'small' characters at the end !
> After automatic configure,
> there are one or two lines "#define HAVE_STRCOLL 1" in config.h.
> If you comment out these lines, probably the problem may be solved.
> //
> Some OS use strcasecmp in strcoll,
> in case of absence of locale data used by strcoll().

As it turns out this is not a bug.  It seems that in the de_DE locale and
probably in other locales as well the upper and lowercase letters have the
same weight determined by the LC_COLLATE locale category.  POSIX says that
range expressions must use the collating order determined by LC_COLLATE.
Of course POSIX also tells that range expressions shall not be used in
Strictly Conforming POSIX.2 Applications because their behavior is
dependent on the collating sequence.  POSIX conforming applications should
use character class expressions instead which are not yet supported by zsh
:-(.  Setting LC_COLLATE to C or POSIX should cure these problems but note
that is also affects sorting.


Messages sorted by: Reverse Date, Date, Thread, Author