[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Предлагаю кирилизацию для Дебиана

	Добрый день,

	Сделал пакеты для кирилизации Дебиана.  Буду рад о Ваших
замечаниях и пожеланиях по улучшению этих пакетах.

	Кирилица, которую они предосавляют должна быть независимая от
языка и кодировки, но пока это еще не так.  Например в пакетах нет
украинских клавиатурних раскладках, а сербская раскладка имеется
только для консоли.  К поддерживаемым кодировкам нужно добавить CP855
и ISO-IR-111 (ECMA-Cyrillic).

	Пакеты можете найти здесь:


Если используете apt, то в /etc/apt/sources.list можете добавить такую

deb ftp://lml.bas.bg/home/anton/debian potato/

Источники расположены здесь:


	Далее следует часть от документации этих пакетах, поэтому и
написано по английски.


After installing the package locale-cyrillic you will be able to use
the following Cyrillic locales:

      bg_BG.CP1251  bg_BG.ISO8859-5  bg_BG.KOI8-R  bg_BG.KOI8-U
      by_BY.CP1251  by_BY.ISO8859-5  by_BY.KOI8-R  by_BY.KOI8-U
      mk_MK.CP1251  mk_MK.ISO8859-5  mk_MK.KOI8-R  mk_MK.KOI8-U
      ru_RU.CP1251  ru_RU.ISO8859-5  ru_RU.KOI8-R  ru_RU.KOI8-U
      ru_UA.CP1251  ru_UA.ISO8859-5  ru_UA.KOI8-R  ru_UA.KOI8-U
      uk_UA.CP1251  uk_UA.ISO8859-5  uk_UA.KOI8-R  uk_UA.KOI8-U

Choose one of them depending of your working language, country and
working encoding.  For example let we choose the locale ru_UA.CP1251,
it is for Russian language in Ukraine and working encoding CP1251.

Then the environment variable LANG should have the value
"ru_UA.CP1251" (without the quotes).  This can be made by the
following command (if you use Bourne-like shell):

LANG=ru_UA.CP1251; export LANG

Put this command in your ~/.profile or ~/.bash_profile.

If you are system administrator you can set default encoding for users
by putting this command in /etc/environment.  Then add the following
line in the file /etc/profile:

test -f /etc/environment && . /etc/environment

(Be careful for spaces around the dot.)



The package console-tools-cyrillic (upstream author: Victor Wagner
<vitus@ice.ru> <vitus@wagner.rinet.ru>) gives you easy and powerful
"cirillization" of the Linux console.  It is recommended that you
install also the package console-tools.

For fast Cyrillic use the script `cyr'.  Try `cyr --help' for usage
summary.  First time you invoke `cyr' in this way:

cyr -k sr -e iso-8859-5 -s arab -f14 --save

This sets Cyrillic on console with Serbian keyboard, working encoding
ISO-8859-5, and 14-point font `arab'.  The option `--save' says `cyr'
to save this combination as default for next invoking.

After this saving it is enough just to run `cyr' without parameters.
Or you can use a command like

cyr -ecp1251

to work with your default keyboard and font but with CP1251.  Or to
play with

cyr -s lenta

and see how look other supported Cyrillic fonts.


Usually when you switch to X Window and back to Linux console the
Cyrillic on console brokes.  But it is easy to restore it by the
script `cyr'.

This why usually it have sense to setup Cyrillic on console at
run-time only if no local X server is started.  The file
/etc/console-tools/default.kmap.gz is the loaded at run-time keyboard
mapping.  For example after the command

zcat -9 /usr/share/console-cyrillic/ru-koi8-r.kmap >/etc/console-tools/default.kmap.gz

the system will load Russian keyboard for KOI8-R at each bootup.

The file /etc/console-tools/config tells what fonts to load at boot
time.  For example add the following two lines in it:


and then the font UniCyr_8x16.psf will be loaded for working in

Ofcource in these examples you can use any other keyboard mapping,
font and application charmap instead of ru-koi8-r.kmap,
UniCyr_8x16.psf and koi8-r.acm.gz.  The data-files of the package
console-tools-cyrillic are installed in the directory

The files *.kmap are keyboard maps.  The file cyrillic.fallback.gz is
a SFM fallback table that gives approximations of some symbols and
letters in the Cyrillic encodings with other symbols and letters.  The
file cyrillic-graph.fallback.gz gives approximations also for the
pseudographic symbols.  All other data files are explained in the
files README and README.ru



The package x-cyrillic gives you environment for language and encoding
independent working with Cyrillic in X Window.

Suppose you want to work with CP1251 and Byelarussian keyboard.  Then
put commands like these at the beginning of your ~/.xsession file:

LANG=by_BY.CP1251; export LANG
xcyr by basic grp:toggle

The parameters of the command `xcyr' are similar to those of the
command `setxkbmap'.  First argument is the keyboard layout and second
argument is variant of this layout.  Currently supported are:

	layout 'bg'   with variants `bds', `phonetic' and `traditional';
	layout `by'   with variants 'basic' and `winkeys';
	layout 'byru' with variants `basic' and `winkeys';
	layout `ru'   with variants `basic' and `winkeys'.

The third argument is the `option' to the keyboard.  Currently
supported are:

	option `grp:switch'
The right Alt key temporary chooses Cyrillic.

	option `grp:toggle'
The right Alt key switches between Cyrillic and Latin.

	option `grp:shift_toggle'
Pressing both Shift keys together switches between Cyrillic and

	option `grp:ctrl_shift_toggle)'
Pressing Control and Shift keys together switches between Cyrillic and

	option `grp:caps_toggle)'
Caps Lock switches between Cyrillic and Latin, Shift + Caps Lock
toggles caps lock.

	option `grp:ctrl_alt_toggle'
Pressing Control and Alt keys together switches between Cyrillic and

The script `xcyr' tries to guess your working encoding from the name
of the active locale.  You can override this by the option -e:

xcyr -e koi8-r ru basic grp:toggle

This command chooses working with KOI8-R regardless of the active


Sometimes it is impossible to customise a program to use Cyrillic
fonts.  To easier the problem the script `xcyr' makes Cyrillic aliases
that claim to be ISO-8859-1 fonts.

The aliases with font family `hylvetica' correspond to the font family
`helvetica'.  So if some program will not use Cyrillic fonts, make it
to use the font `hylvetica' instead of `helvetica'.  Similarly `tymes'
corresponds to `times', `cyrier' to `courier', `lucyda' to `lucida',

If you don't like these aliases start `xcyr' with the option -x or

It is possible to exclude completely Latin fonts from the font path and
use aliases of Cyrillic fonts that mimic to be the standard Latin
fonts.  This is made by the script `cyrhack'.  The command

cyrhack on

excludes Latin fonts from the font path.  The command

cyrhack off

returns them back to the font path.  If you use this command it is
recommended to invoke it as early as possible, but after the command
`xcyr'.  The command `cyrhack' accepts the option -e too:

cyrhack -e koi8-r on

This excludes standard Latin fonts from the font path and makes all
programs to use KOI8-R fonts regardless of the current active locale.


The following packages contain Cyrillic fonts that `xcyr' and
`cyrhack' can use:

xfonts-bolkhov-cp1251, xfonts-cronyx-cp1251, xfonts-edict-cp1251;
xfonts-bolkhov-iso,    xfonts-cronyx-iso,    xfonts-edict-iso;
xfonts-bolkhov-koi8r,  xfonts-cronyx-koi8r,  xfonts-edict-koi8r;
xfonts-bolkhov-koi8u,  xfonts-cronyx-koi8u,  xfonts-edict-koi8u.

It is recommended to install at least one package with KOI8-R fonts
because Netscape uses them.  Similarly install at least one package
with ISO-8859-5 fonts because Emacs-mule uses them.  If your encoding
is A install also the packages xfonts-bolkhov-A and xfonts-cronyx-A.
The first contains fonts of the highest quality and the second is the
only collection with 100dpi fonts.  And finally install any other font
packages you want.


If you are system administrator you can setup default Cyrillic for all
users.  Basicly there are two things to do: to setup default font path
and to setup default keyboard.  This is configured in the file

The section `Files' in this file contains lines with the keyword
`FontPath'.  Before any other lines with this keyword put lines with
the directories containing fonts you want.  Let the fonts with the
default encoding be first and after them put lines for other fonts you
want.  The directories of the fonts are documented in the files

As for example suppose you want to setup KOI8-U as default encoding.
You install the packages xfonts-bolkhov-koi8u, xfonts-cronyx-koi8u,
xfonts-bolkhov-koi8r and xfonts-bolkhov-iso and put the following
lines at the beginning of the section `Files':

FontPath "/usr/X11R6/lib/X11/fonts/bolkhov/koi8-u/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/cronyx/koi8-u/100dpi"
FontPath "/usr/X11R6/lib/X11/fonts/bolkhov/koi8-u/misc"
FontPath "/usr/X11R6/lib/X11/fonts/bolkhov/koi8-r/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/bolkhov/koi8-r/misc"
FontPath "/usr/X11R6/lib/X11/fonts/bolkhov/iso-8859-5/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/bolkhov/iso-8859-5/misc"

If you want the aliases `hylvetica', `tymes', `cyrier', etc. put also
this line:

FontPath "/usr/X11R6/lib/X11/fonts/cyrhack/default.koi8-u"

The default X keyboard is configured in the section `Keyboard' of the
file /etc/X11/XF86Config.  If you use Russian keyboard this section
may look like this:

Section "Keyboard"
	Protocol "Standard"
	XkbLayout "ru"
	XkbVariant "basic"
	XkbOptions "grp:toggle"

REMARK.  Currently X Window doesn't support working with CP1251.
Because of that if you work with that encoding you should use

	XkbLayout "ru1251"

in /etc/X11/XF86Config instead of

	XkbLayout "ru"

	Антон Зиновиев
	anton@lml.bas.bg, zinoviev@fmi.uni-sofia.bg

Reply to: