On Sat, 2 Aug 2003 00:44:16 +0200, Artur R. Czechowski wrote:
> When LC_COLLATE is set to pl_PL [] glob does not work correctly:
>
> arturcz@zlom:/tmp/bash-test$ echo $LC_COLLATE
> pl_PL
> arturcz@zlom:/tmp/bash-test$ touch a b C c D e F G h
> arturcz@zlom:/tmp/bash-test$ echo [A-Z]
> b c C D e F G h
> arturcz@zlom:/tmp/bash-test$ export LC_COLLATE=C
> arturcz@zlom:/tmp/bash-test$ echo [A-Z]
> C D F G
You didn't specify what would you consider "working correctly"
so I assume you expect LC_COLLATE not to affect what a range expression
matches.
SUSv3 says:
7. In the POSIX locale, a range expression represents the set of collating
elements that fall between two elements in the collation sequence, inclusive.
In other locales, a range expression has unspecified behavior: strictly
conforming applications shall not rely on whether the range expression is
valid, or on the set of collating elements matched.
I would say matching according to the specified collating order _is_ reasonable.
> I am not sure that this is really bash error, that's why I Cc-ed it to
> locales@packages.
Another question is if the collating order for pl_PL placing lowercase letters
before corresponding uppercase letters is correct. I'm not sure.
Actually I'd do the opposite but it's not based on reading of any actual standards.
--
Michał Politowski -- mpol@charybda.icm.edu.pl
Warning: this is a memetically modified message
Attachment:
pgp4YOg0Jh5yc.pgp
Description: PGP signature