Set LANG if it isn't already.

This commit is contained in:
hjp 2004-08-27 12:17:14 +00:00
parent 8fbc79fa50
commit d0f4bc6921
1 changed files with 18 additions and 0 deletions

18
.zshenv
View File

@ -110,6 +110,24 @@ HP-UX*10.*)
;; ;;
Linux*) Linux*)
export LC_COLLATE=POSIX export LC_COLLATE=POSIX
if [ -z "$LANG" ]
then
utf=`locale -a | grep en_US.utf8`
if [ -n "$utf" ]
then
# this is a bit of a hack -
# locale -a advertises the locale as "en_US.utf8",
# but the glibc accepts both "en_US.utf8" and
# "en_US.UTF-8" and xterm recogizes only the latter.
# So we explicitely set the latter, even though that's
# not the canonical name and may break some day.
#
LANG=en_US.UTF-8
else
# fall back to latin 1.
LANG=en_US.iso88591
fi
fi
# export LC_TIME=de_AT # don't remember what that was for # export LC_TIME=de_AT # don't remember what that was for
;; ;;
esac esac