On Sat, Feb 28, 2004 at 10:45:49AM -0500, Thomas Dickey wrote:
> I didn't comment on this before, but his patch would not have been sufficient
> since KOI8-R uses codes in the range 128-159. But I added the -k8 option
> last year to address this, so it is possible to make it work. Recently
> (testing for ncurses), I adapted the uxterm script to make a koi8-term
> script. It's not generally useful since the fonts are not in a standard
> distribution. Perhaps there would be interest in making a package to
> cover this.
Thanks, Thomas!
Can I get some comments from the debian-x list as to whether this
wrapper script (koi8-term), and app-defaults file (KOI8Term) should be
shipped with the xterm package?
I'm inclined to think it should. Anyone?
> #!/bin/sh
> # $XFree86: xc/programs/xterm/uxterm,v 1.4 2001/10/24 01:21:25 dickey Exp $
> # wrapper script to setup xterm with KOI8-R locale
>
> program=xterm
> found=no
>
> export LANG=ru_RU.KOI8-R
> # Check environment variables that xterm does, in the same order:
> for name in LC_ALL LC_CTYPE LANG
> do
> eval 'value=$'$name
> if test -n "$value" ; then
> case $value in
> *.KOI8-R)
> found=yes
> ;;
> C|POSIX)
> # Yes, I know this is not the same - but why are you
> # here then?
> value=en_US
> ;;
> esac
> break
> fi
> done
>
> # If we didn't find one that used KOI8-R, modify the safest one. Not everyone
> # has a proper locale installed (and there appears to be no trivial/portable way
> # to determine whether it is, from a shell script). We could check if the
> # user's shell does not reset unknown locale specifiers, but not all shells do.
> if test $found != yes ; then
> if test -n "$value" ; then
> eval ${name}=`echo ${value} |sed -e 's/\..*//'`.KOI8-R
> eval export ${name}
> else
> LC_CTYPE=ru_RU.KOI8-R
> export LC_CTYPE
> fi
> fi
>
> # for testing:
> test -f ./xterm && program=./xterm
>
> exec $program -class KOI8Term -title 'KOI8 xterm' "$@"
> ! $XFree86: xc/programs/xterm/UXTerm.ad,v 1.2 2001/11/15 00:29:12 dawes Exp $
>
> ! Use
> ! xterm -class KOI8Term
> ! to set resources for KOI8-R mode with corresponding fonts.
>
> #include "XTerm-color"
>
> *fontMenu.Label: KOI8-R Fonts
> *VT100*allowC1Printable: true
>
> *VT100*font: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-koi8-r
> *VT100*font2: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-koi8-u
> *VT100*font3: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-koi8-r
> *VT100*font4: -xos4-terminus-medium-r-normal--20-200-72-72-c-100-koi8-r
> *VT100*font5: -xos4-terminus-medium-r-normal--24-240-72-72-c-120-koi8-r
> *VT100*font6: -xos4-terminus-medium-r-normal--28-280-72-72-c-140-koi8-r
--
G. Branden Robinson | Never attribute to conspiracy that
Debian GNU/Linux | which can be adequately explained
branden@debian.org | by economics.
http://people.debian.org/~branden/ |
Attachment:
signature.asc
Description: Digital signature