From: Mark Wooding Date: Thu, 7 Feb 2008 13:36:47 +0000 (+0000) Subject: Use UTF8 on X, and guess at console. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/bc30f5c465d7c38c208e0eccf28b017f4d52206a?hp=1a4d7e7dc6a51ad05ef719ed1b7b9db7897c050f Use UTF8 on X, and guess at console. Actually, we let the user configure the character set separately for both. --- diff --git a/bash_profile b/bash_profile index 86e07b1..466efb9 100644 --- a/bash_profile +++ b/bash_profile @@ -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 4e941d1..e7eb9c3 100644 --- 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 cf0ca4a..9620894 100644 --- a/emacs +++ b/emacs @@ -110,11 +110,10 @@ ;; --- 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 --- diff --git a/mdw.conf b/mdw.conf index f6c50a2..9c78fbf 100644 --- 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 diff --git a/putty-defaults b/putty-defaults index ce7ffb6..abcff78 100644 --- a/putty-defaults +++ b/putty-defaults @@ -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=