chiark / gitweb /
dot/bash_profile: Use `kbd_mode' to check for UTF-8 console.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 13 May 2011 19:59:06 +0000 (20:59 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 13 May 2011 19:59:06 +0000 (20:59 +0100)
Unfortunately, `vt-is-UTF8' isn't always available.

dot/bash_profile

index 12f5f52a562f87da1c052a93a1a4ec556aa02560..7d3bf4c231eced0bdec5c4cd72e0d304a3fd21d0 100644 (file)
@@ -118,7 +118,8 @@ else
   : ${LANG=${LC_CTYPE-${LC_ALL-`mdw-conf console-ctype`}}}
   case "$TERM,`tty`" in
     linux,/dev/tty*)
-      if vt-is-UTF8 >/dev/null 2>&1; then
+      if { vt-is-UTF8 ||
+          kbd_mode | grep UTF-8; } >/dev/null 2>&1; then
        ctype=.utf8
       else
        ctype=