Generally, to set the certain utility up to handle the Cyrillic requires just to allow the 8 bit input. In some cases it is required to tell the application to show the extended ASCII characters in their "native" form.
Three variables should be set on order to make bash
understand the
8-bit characters. The best place is ~/.inputrc
file. The following should be set:
set meta-flag on set convert-meta off set output-meta on
The following should be set in .cshrc
:
setenv LC_CTYPE iso_8859_5 stty pass8
If you don't have the POSIX stty
(impossible for Linux), then
replace the last call to the following:
stty -istrip cs8
The minimal cyrillic support in emacs
is done by adding the following
calls to one's .emacs
(provided that the Cyrillic character set
support is installed for console or X respectively):
(standard-display-european t) (set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) 0)
This allows the user to view and input documents in Russian.
However, such mode is not of a big convenience because emacs
doesn't
recognize the usual keyboard commands while set in Cyrillic input
mode. There are a number of packages which use the different
approach. They don't rely on the input mode stuff established by the
environment (either X or console. Instead, they allow the user to
switch the input mode by the special emacs
command and emacs
itself is responsible for re-mapping the character set. The author
took a chance to look at three of them. The russian.el
package by
Valery Alexeev (ava@math.jhu.edu
) allows the user to switch
between cyrillic and regular input mode and to translate the contents
of a buffer from one Cyrillic coding standard to another (which is
especially useful while reading the texts imported from MS-DOG).
The only inconvenience is that emacs is still treating the russian characters as special ones, so it doesn't recognize russian words' bounds and case changes. To fix it, you have to modify the syntax and case tables of emacs:
;; there is a garbage in the variables below, since SGML doesn't like ;; cyrillic characters. You have to put the uppercase and lowercase ;; parts of the Russian alphabet respectively (see the actual files) (setq *russian-abc-ucase* "*** SGML SUCKS ***") (setq *russian-abc-lcase* "*** SGML SUCKS ***") (let ((i 0) (len (length *russian-abc-ucase*))) (while (< i len) (modify-syntax-entry (elt *russian-abc-ucase* i) "w ") (modify-syntax-entry (elt *russian-abc-lcase* i) "w ") (set-case-syntax-pair (elt *russian-abc-ucase* i) (elt *russian-abc-lcase* i) (standard-case-table)) (setq i (+ i 1))))
For this purpose I created a rusup.el
file which
does this, as well as a couple handy functions. You have to load it in
your ~/.emacs
.
Another alternative is the package remap
which tries to
make such support more generic. This package is written by Per
Abrahamsen (abraham@iesd.auc.dk
) and is accessible at
ftp.iesd.auc.dk
.
As for the author's opinion, I would suggest to start using the
russian.el
package because it is very easy to setup and use.
There is an ***rspell*** package created by Neal Dalton
(nrd@cray.com
) for ispell
, but I experienced some problems
making it work right away. Try it - maybe you will be luckier.
As for the public domain ksh
implementation - pdksh 5.1.3
,
you can input 8 bit characters only in vi
input mode. Use:
set -o vi
So far, less
doesn't support the KOI-8 character set, but the
following environment variable will do the job:
LESSCHARSET=latin1
As of version 3.1.2, select the full 8 bits item in the Options/Display menu.
Set the following resource in your .Xdefaults
file:
Netscape*documentFonts*registry: koi8
Instead, if you want to set it up globally, add the following line to
the application defaults file for the Netscape
(usually
/usr/lib/X11/app-defaults/Netscape
):
*documentFonts*registry: koi8
Make sure that the shell on the destination site is properly set
up. Then, if your rlogin
doesn't work by default, use 'rlogin
-8
'.
As of version 8, sendmail
handles 8-bit data correctly by
default. If it doesn't do it for you, check the EightBitMode
option and option 7
given to mailers in your
/etc/sendmail.cf
. See "Sendmail. Operation and
Installation Guide" for details.
Use the same way as with csh
(see section
csh). The startup files in this case are .zshrc
or
/etc/zshrc
.