[ -n "$SYSFONT" ] && CONSOLEFONT="$SYSFONT"
-case "$LANG" in
- *.utf8|*.UTF-8)
- if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then
+
+charmap=
+# /usr might not be mounted
+if [ -x /usr/bin/locale ]; then
+ charmap=$(LANG="$LANG" locale charmap)
+fi
+
+if [ "$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
fi
exit 0
-
-# This must be last line !
-# vi:syntax=sh