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

Re: 'LC_COLLATE=de ls [A-Z]*' expands to 'every file' including lowercase

On Jul 8,  1:40am, Zoltan Hidvegi wrote:
} Subject: Re: 'LC_COLLATE=de ls [A-Z]*' expands to 'every file' including l
} > I'd vote in favor of removing HAVE_STRCOLL from matchonce() in glob.c.
} According to the standard:
}          This variable determines the behaviour of range expressions,
}          equivalence classes and multi-character collating elements
}          within pattern matching.

Which standard, specifically?

This is a case where that standard is harmfully flying in the face of
common sense.  Of course LC_COLLATE ought to apply to POSIX character
classes once those are supported, and ought to apply to the collation
of any resulting ordered list.  But to have it apply to the characters
within ranges like [A-Z] will cause the simplest shell scripts to go
completely haywire; we'll have to start putting "local LC_COLLATE=C"
or some such at the top of every autoloaded function, along with all
the "emulate -R" and "setopt localoptions" junk that's already there.

Standards are not meant to be followed blindly.  That's why the IETF,
for example, has a collection of rules for interpreting MUST, SHOULD,
MAY, etc. when they appear in IETF documents.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

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