export UID
# Indicates LC_CTYPE an UTF-8 terminal?
-[ -n "$LC_CTYPE" ] \
- && LC_encoding="${LC_CTYPE#*.}" || LC_encoding="ISO8859-1"
+if [ -n "$LC_CTYPE" ]; then
+ LC_encoding="${LC_CTYPE#*.}"
+else
+ case "$TERM" in
+ "xterm-"*)
+ LC_encoding="UTF-8"; ;;
+ *)
+ LC_encoding="ISO8859-1"
+ esac
+fi
# Set locale if it is not set or doesn't contain a dot:
[ "$LANG" = "${LANG#*.}" -a "$LANG" != "C" ] \
&& export LANG="${LANG:-de_DE}.${LC_encoding}"