aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlang.csh13
-rwxr-xr-xlang.sh9
-rwxr-xr-xsetsysfont17
3 files changed, 39 insertions, 0 deletions
diff --git a/lang.csh b/lang.csh
index 69d67afc..999b5c04 100755
--- a/lang.csh
+++ b/lang.csh
@@ -59,6 +59,19 @@ if ($sourced == 1) then
breaksw
endsw
endif
+ if ($?LANG) then
+ switch ($LANG)
+ case *.utf8;
+ if ( $?TERM ) then
+ if ( "$TERM" == "linux" ) then
+ if ( `/sbin/consoletype` == "vt" ) then
+ unicode_start
+ endif
+ endif
+ endif
+ breaksw
+ endsw
+ endif
unsetenv SYSFONTACM
unsetenv SYSFONT
endif
diff --git a/lang.sh b/lang.sh
index 4980f9e1..fae662e8 100755
--- a/lang.sh
+++ b/lang.sh
@@ -62,6 +62,15 @@ if [ "$sourced" = 1 ]; then
;;
esac
fi
+ if [ -n "$LANG" ]; then
+ case $LANG in
+ *.utf8)
+ if [ "$TERM" = "linux" -a "`/sbin/consoletype`" = "vt" ]; then
+ unicode_start
+ fi
+ ;;
+ esac
+ fi
unset SYSFONTACM SYSFONT
fi
diff --git a/setsysfont b/setsysfont
index 8c524c88..17b9655f 100755
--- a/setsysfont
+++ b/setsysfont
@@ -6,6 +6,23 @@ if [ -f /etc/sysconfig/i18n ]; then
. /etc/sysconfig/i18n
fi
+if [ -n "$LANG" ]; then
+ case $LANG in
+ *.utf8)
+ if [ -n "$SYSFONT" ]; then
+ if [ -n "$SYSFONTACM" ]; then
+ unicode_start $SYSFONT $SYSFONTACM
+ else
+ unicode_start $SYSFONT
+ fi
+ else
+ unicode_start
+ fi
+ exit $?
+ ;;
+ esac
+fi
+
if [ -x /bin/consolechars -o -x /usr/bin/consolechars ]; then
if [ -n "$SYSFONT" ]; then
ARGS=$SYSFONT