aboutsummaryrefslogtreecommitdiffstats
path: root/lang.csh
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-10-04 21:52:15 +0000
committerBill Nottingham <notting@redhat.com>2006-10-04 21:52:15 +0000
commitdf8dbb37bbf199978680058891dfa9bbd5d90b74 (patch)
treeea5e0a9699fe4dad1afd2f11dbe4e9bc727f5cc2 /lang.csh
parentc1b85def2e996813472fb173a0f368a32f144bab (diff)
downloadinitscripts-df8dbb37bbf199978680058891dfa9bbd5d90b74.tar
initscripts-df8dbb37bbf199978680058891dfa9bbd5d90b74.tar.gz
initscripts-df8dbb37bbf199978680058891dfa9bbd5d90b74.tar.bz2
initscripts-df8dbb37bbf199978680058891dfa9bbd5d90b74.tar.xz
initscripts-df8dbb37bbf199978680058891dfa9bbd5d90b74.zip
set iutf8 if appropriate (#186961)
handle non-utf8 locales correctly (#200100)
Diffstat (limited to 'lang.csh')
-rwxr-xr-xlang.csh27
1 files changed, 24 insertions, 3 deletions
diff --git a/lang.csh b/lang.csh
index 1b26d902..334a6294 100755
--- a/lang.csh
+++ b/lang.csh
@@ -25,6 +25,8 @@ if ($sourced == 1) then
unsetenv LC_ALL
endif
endif
+
+ set consoletype=`/sbin/consoletype`
if ($?CHARSET) then
switch ($CHARSET)
@@ -36,7 +38,7 @@ if ($sourced == 1) then
case latin2*:
if ( $?TERM ) then
if ( "$TERM" == "linux" ) then
- if ( `/sbin/consoletype` == "vt" ) then
+ if ( "$consoletype" == "vt" ) then
/bin/echo -n -e '\033(K' >/dev/tty
endif
endif
@@ -54,7 +56,7 @@ if ($sourced == 1) then
case latin2-ucw*:
if ( $?TERM ) then
if ( "$TERM" == "linux" ) then
- if ( `/sbin/consoletype` == "vt" ) then
+ if ( "$consoletype" == "vt" ) then
/bin/echo -n -e '\033(K' > /dev/tty
endif
endif
@@ -66,9 +68,12 @@ if ($sourced == 1) then
switch ($LANG)
case *.utf8*:
case *.UTF-8*:
+ if ( "$consoletype" == "vt" || "$consoletype" == "pty" ) then
+ stty iutf8
+ endif
if ( $?TERM ) then
if ( "$TERM" == "linux" ) then
- if ( `/sbin/consoletype` == "vt" ) then
+ if ( "$consoletype" == "vt" ) then
if ( -x /bin/unicode_start ) then
if { /sbin/consoletype fg } then
if ( $?SYSFONT ) then
@@ -84,6 +89,22 @@ if ($sourced == 1) then
endif
endif
breaksw
+ case *:
+ if ( "$consoletype" == "vt" || "$consoletype" == "pty" ) then
+ stty -iutf8
+ endif
+ if ( $?TERM ) then
+ if ( "$TERM" == "linux" ) then
+ if ( "$consoletype" == "vt" ) then
+ if ( -x /bin/unicode_stop ) then
+ if { /sbin/consoletype fg } then
+ /bin/unicode_stop
+ endif
+ endif
+ endif
+ endif
+ endif
+ breaksw
endsw
endif
unsetenv SYSFONTACM