Quote:
Originally Posted by bathory
You didn't mention your distro to be able to find the proper solution to your problem. You can search /etc/profile or look at the files under the dir /etc/profile.d to see where the locale variables are set. Locale can also be set at ~/.profile or ~/.bashrc, but this is per user setting and not global as in your case.
Regards
|
Hi and thanks for assistance!
I'm using Scientific Linux 5.1, it is based on rhel5 I guess.
The lang.sh in profile.d contains the following code:
Quote:
if [ -n "$GDM_LANG" ]; then
sourced=1
LANG="$GDM_LANG"
unset LANGUAGE
if [ "$GDM_LANG" = "zh_CN.GB18030" ]; then
export LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
fi
fi
|
Quote:
if [ -n "$LC_ALL" ]; then
if [ "$LC_ALL" != "$LANG" ]; then
export LC_ALL
else
unset LC_ALL
fi
else
unset LC_ALL
fi
[ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
[ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
[ -n "$_XKB_CHARSET" ] && export _XKB_CHARSET || unset _XKB_CHARSET
consoletype=$(/sbin/consoletype)
if [ -n "$CHARSET" ]; then
case $CHARSET in
8859-1|8859-2|8859-5|8859-8|8859-15|koi*)
if [ "$TERM" = "linux" -a "$consoletype" = "vt" ]; then
echo -n -e '\033(K' 2>/dev/null > /proc/$$/fd/0
fi
;;
esac
elif [ -n "$SYSFONTACM" ]; then
case $SYSFONTACM in
iso01*|iso02*|iso05*|iso08*|iso15*|koi*|latin2-ucw*)
if [ "$TERM" = "linux" -a "$consoletype" = "vt" ]; then
echo -n -e '\033(K' 2>/dev/null > /proc/$$/fd/0
fi
;;
esac
fi
if [ -n "$LANG" ]; then
case $LANG in
*.utf8*|*.UTF-8*)
if [ "$TERM" = "linux" ]; then
if [ "$consoletype" = "vt" ]; then
case $LANG in
ja*) LANG=en_US.UTF-8 ;;
ko*) LANG=en_US.UTF-8 ;;
si*) LANG=en_US.UTF-8 ;;
zh*) LANG=en_US.UTF-8 ;;
en_IN*) ;;
*_IN*) LANG=en_US.UTF-8 ;;
esac
[ -x /bin/unicode_start ] && /sbin/consoletype fg && /bin/unicode_start $SYSFONT $SYSFONTACM
fi
fi
;;
*)
if [ "$TERM" = "linux" ]; then
if [ "$consoletype" = "vt" ]; then
case $LANG in
ja*) LANG=en_US ;;
ko*) LANG=en_US ;;
si*) LANG=en_US ;;
zh*) LANG=en_US ;;
en_IN*) ;;
*_IN*) LANG=en_US ;;
esac
[ -x /bin/unicode_stop ] && /sbin/consoletype fg && /bin/unicode_stop
fi
fi
;;
esac
fi
|
what do I have to change in the code to get back to the defaults?
And I dont know for sure what was the default language, could it be C?
I tried to change en_US.UTF-8 in lang.sh to en_US.utf8, because i found folder named en_US.utf8 in locale directory but there was no named en_US.UTF-8, and got the same error message after typing
service hplip restart.
Thanks.