Override LANG in .zshrc.

Removed some obsolete HP-UX stuff.
This commit is contained in:
hjp 2011-07-10 22:32:49 +00:00
parent cfee7d1310
commit 836cebe591
2 changed files with 25 additions and 10 deletions

10
.zshenv
View File

@ -93,14 +93,6 @@ export MANPATH
case "`uname -sr`" in case "`uname -sr`" in
HP-UX*09.*)
export LANG=${LANG:-american.iso88591}
export LC_COLLATE=${LC_COLLATE:-american.iso88591@nofold}
;;
HP-UX*10.*)
export LANG=${LANG:-C.iso88591}
export TZ=MEZ-1MESZ
;;
Linux*) Linux*)
export LC_COLLATE=POSIX export LC_COLLATE=POSIX
if [ -z "$LANG" ] if [ -z "$LANG" ]
@ -132,9 +124,7 @@ case "$LANG" in
export NLS_LANG=american_america.WE8ISO8859P1 export NLS_LANG=american_america.WE8ISO8859P1
;; ;;
*.UTF-8) *.UTF-8)
#export LESSCHARSET=latin1
export NLS_LANG=american_america.UTF8 export NLS_LANG=american_america.UTF8
# export LC_TIME=de_AT.UTF-8
;; ;;
esac esac

25
.zshrc
View File

@ -98,3 +98,28 @@ fi
autoload -U compinit autoload -U compinit
compinit compinit
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
export LANG
case "$LANG" in
*.iso88591)
export LESSCHARSET=latin1
export NLS_LANG=american_america.WE8ISO8859P1
;;
*.UTF-8)
export NLS_LANG=american_america.UTF8
;;
esac