Red Hat Bugzilla – Bug 430809
Changed locale settings are reverted in subshell
Last modified: 2008-01-29 16:39:37 EST
Description of problem:
If a user changes the current locale at the terminal by changing one of the
locale environment variables, those changes are lost in a new shell and the
system-wide defaults are substituted.
Version-Release number of selected component (if applicable):
initscripts-8.45.17.EL-1.el5.centos.1 (CentOS 5.1)
Steps to Reproduce:
1. export LANG=xx
3. echo Should be xx: $LANG
Should be xx: en_CA.UTF-8
Should be xx: xx
This problem is solved in at least one other distribution by renaming the
"sourced" environment variable in /etc/profile.d/lang.sh to LC_SOURCED and
exporting it so that the /etc/sysconfig/i18n file is only ever read in once.
This is fixed in the development tree, and will be in RHEL 6. I'm leery of
changing this behavior in a RHEL update for earlier releases, so I don't think
this will be backported at this time.