epoptes team mailing list archive
-
epoptes team
-
Mailing list archive
-
Message #00508
Re: [Question #235416]: Epoptes is running commands with wrong locale
Question #235416 on Epoptes changed:
https://answers.launchpad.net/epoptes/+question/235416
Laércio de Sousa gave more information on the question:
Another information: in openSUSE there's a file named
/etc/profile.d/lang.sh, with the content below. It references another
openSUSE-specific config file named /etc/sysconfig/language, whose
relevant part is the setting RC_LANG="my locale", which is used by other
programs to set LANG.
#
# lang.sh: Set interactive language environment
#
# Used configuration files:
#
# /etc/sysconfig/language
# $HOME/.i18n
#
#
# Already done by the remote SSH side
#
test -z "$SSH_SENDS_LOCALE" || return
#
# Already done by the GDM
#
test -z "$GDM_LANG" || return
#
# Get the system and after that the users configuration
#
if test -s /etc/sysconfig/language ; then
while read line ; do
case "$line" in
\#*|"")
continue
;;
RC_*)
eval ${line#RC_}
;;
ROOT_USES_LANG*)
eval $line
test "$UID" != 0 && ROOT_USES_LANG=yes
;;
esac
done < /etc/sysconfig/language
fi
test -s $HOME/.i18n && . $HOME/.i18n
#
# Handle all LC and the LANG variable
#
for lc in LANG LC_CTYPE LC_NUMERIC LC_TIME \
LC_COLLATE LC_MONETARY LC_MESSAGES \
LC_PAPER LC_NAME LC_ADDRESS \
LC_TELEPHONE LC_MEASUREMENT \
LC_IDENTIFICATION LC_ALL
do
eval val="\$$lc"
if test "$ROOT_USES_LANG" = "yes" ; then
if test -z "$val" ; then
eval unset $lc
else
eval $lc=\$val
eval export $lc
fi
elif test "$ROOT_USES_LANG" = "ctype" ; then
test "$lc" = "LANG" && continue
if test "$lc" = "LC_CTYPE" ; then
LC_CTYPE=$LANG
LANG=POSIX
export LANG LC_CTYPE
else
eval unset $lc
fi
else
if test "$lc" = "LANG" ; then
LANG=POSIX
export LANG
else
eval unset $lc
fi
fi
done
#
# Special LC_ALL handling because the LC_ALL
# overwrites all LC but not the LANG variable
#
if test -n "$LC_ALL" -a "$LC_ALL" != "$LANG" ; then
export LC_ALL
else
unset LC_ALL
fi
unset line ROOT_USES_LANG lc val
#
# end of lang.sh
--
You received this question notification because you are a member of
Epoptes Developers, which is an answer contact for Epoptes.