X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/aa024d097d762aaa2149027fecc28012103f59dd..c537b3bfacb5ca65cc6c3c2b7919c1b3190bb3a0:/bash_profile diff --git a/bash_profile b/bash_profile index 7488133..08e4e13 100644 --- a/bash_profile +++ b/bash_profile @@ -116,8 +116,8 @@ if [ "$DISPLAY" != "" ]; then LANG=`mdw-conf x-ctype` else : ${LANG=${LC_CTYPE-${LC_ALL-`mdw-conf console-ctype`}}} - case "$TERM" in - linux) + case "$TERM,`tty`" in + linux,/dev/tty*) if vt-is-UTF8 >/dev/null 2>&1; then ctype=.utf8 else @@ -158,7 +158,7 @@ export BECOME="--preserve-environment" export PAGER=`type -p less` METAMAIL_PAGER=`type -p less` export LESS="-iqgRh1FX" export LESSOPEN="|lesspipe.sh %s" -case "$LC_CTYPE" in +case "${LC_CTYPE-$LANG}" in *utf8 | *utf-8 | *UTF8 | *UTF-8) LESSCHARSET=utf-8 ;; *) LESSCHARSET=latin1 ;; esac