pgf at brightstareng.com
Wed Aug 31 21:15:25 UTC 2005
> > So its not a bug its a feature.
> I hear the words, but I'm afraid I don't understand.
> Can please you explain how it is possible that '[a-z]*' matches "CVS"
> or "Makefile"? What is the flow of logic, and where is the place
> where the folding of upper and lower case characters creeps in?
i suspect you're only baiting here, because i suspect you know the
answer. i also agree with you in spirit -- to break such a construct
was shortsighted. but here goes anyways: i assume this is because
a-z only including lowercase characters is an accident of ASCII
ordering. other character sets order differently. i.e. ASCII
has the order
and other character sets may look like:
so in that character set, [a-z] represents this:
this is, of course, why the "[:alpha:]" style character classes
were introduced -- they're independent of actual character collation
none of which is any help when all of one's scripts start breaking
because some distribution changed the default LANG setting. (i don't
honestly know why the default was changed. sure seems wrong to me.)
paul fox, pgf at brightstareng.com
More information about the busybox