diff --git a/.zshenv b/.zshenv index 1a0e3eb..c66e124 100644 --- a/.zshenv +++ b/.zshenv @@ -93,14 +93,6 @@ export MANPATH 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*) export LC_COLLATE=POSIX if [ -z "$LANG" ] @@ -132,9 +124,7 @@ case "$LANG" in export NLS_LANG=american_america.WE8ISO8859P1 ;; *.UTF-8) - #export LESSCHARSET=latin1 export NLS_LANG=american_america.UTF8 - # export LC_TIME=de_AT.UTF-8 ;; esac diff --git a/.zshrc b/.zshrc index ad67dc6..638a216 100644 --- a/.zshrc +++ b/.zshrc @@ -98,3 +98,28 @@ fi autoload -U 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