chiark / gitweb /
Use UTF8 on X, and guess at console.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 7 Feb 2008 13:36:47 +0000 (13:36 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 7 Feb 2008 13:36:47 +0000 (13:36 +0000)
Actually, we let the user configure the character set separately for
both.

bash_profile
bashrc
emacs
mdw.conf
putty-defaults

index 86e07b1c38f826e324f88e2b4971032e2daf4858..466efb9deee484b2e0ef2f34529d9479d66de475 100644 (file)
@@ -121,7 +121,13 @@ umask 002
 
 [ -z "$HOST" ] && export HOST=`hostname`
 
-unset LANG LC_COLLATE
+if [ "$DISPLAY" = "" ]; then
+  : ${LC_CTYPE=${LANG-${LC_ALL-`__mdw_conf console-ctype`}}}
+else
+  LC_CTYPE=`__mdw_conf x-ctype`
+fi
+unset LANG LC_ALL LC_COLLATE
+export LC_CTYPE
 
 __mdw_programp distcc && export CCACHE_PREFIX=distcc
 
diff --git a/bashrc b/bashrc
index 4e941d188a1e234504f4e82c481f73a51cf2daf3..e7eb9c3913041993c3cc3e2c518b4504d3fde93d 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -1,4 +1,4 @@
-# -*-sh-*-
+# -*- mode: sh; coding: utf-8 -*-
 #
 # $Id: .bashrc,v 1.6 1996/12/08 20:33:42 mdw Exp $
 #
@@ -30,7 +30,8 @@ if [ -t 0 ]; then
     esac
 
     if (( EUID == 0 )); then
-      left="«" right="»"
+      left=`echo « | iconv -f utf8 -t //translit`
+      right=`echo » | iconv -f utf8 -t //translit`
     else
       case $USER in
        mdw|mwooding)
diff --git a/emacs b/emacs
index cf0ca4aa157504f120a8c790027a5fd6f5875096..962089463d33763ec9ddf3ff602fee8b857d46aa 100644 (file)
--- a/emacs
+++ b/emacs
 ;; --- Internationalization twiddling ---
 
 (trap
-  (standard-display-european 1)
+  ;; Have top-bit-set characters work properly in terminals.
   (let ((im (current-input-mode)))
     (apply #'set-input-mode
-          (nconc (list (nth 0 im) (nth 1 im) 0) (nthcdr 3 im))))
-  (set-language-environment "Latin-1"))
+          (nconc (list (nth 0 im) (nth 1 im) 0) (nthcdr 3 im)))))
 
 ;; --- Don't disable any commands ---
 
index f6c50a24f35a855c6557313d647b84ea1c2b7b26..9c78fbf76f99faad4b775fda6036b584f4e2f7b7 100644 (file)
--- a/mdw.conf
+++ b/mdw.conf
@@ -9,3 +9,5 @@ cvs-root = metalzone.distorted.org.uk:/home/cvs/cvs
 svn-root = svn+ssh://metalzone.distorted.org.uk/home/cvs/svn
 cltl-url = http://metalzone.distorted.org.uk/doc/cltl/
 hyperspec-url = http://metalzone.distorted.org.uk/doc/hyperspec/
+console-ctype = en_GB.iso885915
+x-ctype = en_GB.utf8
index ce7ffb6cf76de3a8d650ddcd86a8d3fbfdbdad84..abcff78c16a1c0ef3c632c5147052a71c4b6c9df 100644 (file)
@@ -97,8 +97,8 @@ DisableBidi=0
 WinNameAlways=0
 WinTitle=
 TermWidth=80
-TermHeight=75
-Font=fixed
+TermHeight=35
+Font=-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso10646-1
 FontQuality=0
 FontVTMode=4
 UseSystemColours=0
@@ -141,7 +141,7 @@ Wordness128=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
 Wordness160=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
 Wordness192=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2
 Wordness224=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2
-LineCodePage=Use font encoding
+LineCodePage=UTF-8
 CJKAmbigWide=0
 UTF8Override=1
 Printer=