Description of problem: Version-Release number of selected component (if applicable): bash-3.2-9.fc7 How reproducible: Always. Steps to Reproduce: 1. mkdir test; cd test 2. touch A a M m S s Z z 3. echo [A-Z] Actual results: A a M m S s Z Expected results: A a M m S s Z z for national locale. A M S Z for locale C. Additional info: Problem applies to any other character range and also for lowercase. But for lowercase in oposit: echo [a-z] results in a M m S s Z z (the first character is missing).
This is not a bug, if you want A-Z and a-z with a nationale local you should use A-z. with a nationale (not C) LC_COLLATE, A-C for example correctly expands to: AaBbC this is to be expected, of you also want to have the lowercase of the end of the range included, end with the lowercase: [A-c] or [A-z] Closing as not a bug, if you disagree please explain why and reopen.
Aha. There is another problem. When I used to unset the LANG variable (and any of LC_* where not set) the default locale was C. Now, the default locale is something another. When I explicitly set LC_COLLATE (or LANG) to C. The behavior is as expected.
Are you sure you have properly unset LANG and if you define that LC_ALL, unsetting LANG gives the C collate behaviour for me.
# echo $LANG sk_SK.UTF-8 # unset LANG # export LANG # echo $LANG # set | grep LC_ # echo [A-Z] A a M m S s Z