Author: qboosh
Date: Sun Mar  9 13:33:53 2008
New Revision: 9575

Modified:
   rc-scripts/trunk/setsysfont
Log:
- use "locale charmap" to detect UTF-8 locales properly
- call unicode_stop for non-UTF locales (Linux 2.6.24+ has unicode console by 
default)

Modified: rc-scripts/trunk/setsysfont
==============================================================================
--- rc-scripts/trunk/setsysfont (original)
+++ rc-scripts/trunk/setsysfont Sun Mar  9 13:33:53 2008
@@ -8,13 +8,13 @@
 
 [ -n "$SYSFONT" ] && CONSOLEFONT="$SYSFONT"
 
-case "$LANG" in
-  *.utf8|*.UTF-8)
+if [ "$(LANG="$LANG" locale charmap)" = "UTF-8" ]; then
        if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then
                exec unicode_start $CONSOLEFONT $CONSOLEMAP
        fi
-       ;;
-esac
+elif [ -x /bin/unicode_stop ] && /sbin/consoletype fg ; then
+       unicode_stop
+fi
 
 # console-tools, obsolete part
 if [ -x /usr/bin/consolechars -o -x /bin/consolechars ]; then
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to