Package: bash
Version: 3.1-1
Followup-For: Bug #333953

Even though LC_COLLATE is not set, you've got LANG set to EN_us (as your
bug report says), so LC_COLLATE inherits the value of LANG.

See
  http://lists.gnu.org/archive/html/bug-fileutils/2001-03/msg00027.html
for some more information

I agree that this is a dangerous "feature" for most of us, who expect
[a-z] not to match uppercase letters.  I just discovered this myself,
and I would certainly call this a *BUG* in that it changes the expected
behavior of matching.

I think Debian should ensure that bash (and sort?) behaves "as expected"
unless an explicit choice is made to use locale processing.  I don't think
this should be done via looking at LANG (or even LC_COLLATE), since it
is quite possible that a non-english-speaker may also expect "C" semantics
from the shell (especially if they are learning from a textbook).

I'd suggest a dpkg configuration option for bash to "force LC_COLLATE=C"
which defaults to "yes".  Note that I *don't* think that this should be an
environment setting, since (especially if I am not a native english speaking)
may want LANG=<my native language> in my environment so that applications
inherit the correct value, but still want bash to use C semantics (even
if it is invoked from a command line where LANG=<my native language>).

[Note that there are a number of locations where bash uses locale.  It
*should* still use the LANG=<native language> info when communicating with
the user.  It's just the uses in regular expressions and string comparisons
which are at issue here.]

On the other hand, maybe we should be teaching people that ranges in regular
expressions are ill-defined, and we should all be using [[:lower:]] instead.

In that case, perhaps we should emit a warning every time a range is used,
unless the shell option bash_shut_up_about_ranges_I_know_they_are_borked is
set?
 --scott

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-rc5
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages bash depends on:
ii  base-files                    3.1.9      Debian base system miscellaneous f
ii  debianutils                   2.15.2     Miscellaneous utilities specific t
ii  libc6                         2.3.5-8.1  GNU C Library: Shared libraries an
ii  libncurses5                   5.5-1      Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to