Package: bash
Version: 3.1-4
Severity: important
"unset LANG" doesn't change the locale of the current bash.
I think this is an omission. This leads to the following
inconsitency:
$ env | egrep LANG
LANG=en_US
LANGUAGE=en_US:en_GB:en
$ echo [D-Y]*
m M
$ unset LANG LANGUAGE
$ echo [D-Y]*
m M
$ /bin/bash
$ env | egrep LANG
$ echo [D-P]*
M
$
That is, even in the absense of the LANG env. var.,
[D-Y] matches both lower and upper cases in the parent bash,
but not so, in the child. Since "export LANG=C" changes
the locale of the current bash, so should "unset LANG".
The experiment above was done without any dot-files in my home
directory. In particular, I didn't have
~/.bash, ~/.bash_profile, or ~/.profile
I'm attaching a typescript obtained as
script -c 'ltrace -e setlocale bash'
(My mistypes were edited out from the script.)
Hope this helps,
Ryo
------------------
Script started on Tue 25 Apr 2006 09:52:00 PM HST
setlocale(6, "") = "en_US"
setlocale(0, "en_US") = "en_US"
[EMAIL PROTECTED]:~$ env | egrep LANG
LANG=en_US
LANGUAGE=en_US:en_GB:en
--- SIGCHLD (Child exited) ---
[EMAIL PROTECTED]:~$ unset LANG LANGUAGE
setlocale(6, "en_US") = "en_US"
setlocale(0, "en_US") = "en_US"
setlocale(3, "en_US") = "en_US"
setlocale(5, "en_US") = "en_US"
setlocale(1, "en_US") = "en_US"
setlocale(2, "en_US") = "en_US"
setlocale(6, "en_US") = "en_US"
setlocale(0, "en_US") = "en_US"
setlocale(3, "en_US") = "en_US"
setlocale(5, "en_US") = "en_US"
setlocale(1, "en_US") = "en_US"
setlocale(2, "en_US") = "en_US"
[EMAIL PROTECTED]:~$ unset LANG LANGUAGE
[EMAIL PROTECTED]:~$ env | egrep LANG
--- SIGCHLD (Child exited) ---
[EMAIL PROTECTED]:~$ echo [D-P]*
m M
[EMAIL PROTECTED]:~$ /bin/bash
[EMAIL PROTECTED]:~$ env | egrep LANG
[EMAIL PROTECTED]:~$ echo [D-P]*
M
[EMAIL PROTECTED]:~$ exit
exit
--- SIGCHLD (Child exited) ---
[EMAIL PROTECTED]:~$ exit
exit
+++ exited (status 0) +++
Script done on Tue 25 Apr 2006 09:53:13 PM HST
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages bash depends on:
ii base-files 3.1.11 Debian base system miscellaneous f
ii debianutils 2.15.3 Miscellaneous utilities specific t
ii libc6 2.3.6-7 GNU C Library: Shared libraries
ii libncurses5 5.5-1.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]