Linux Belarusian HOWTO

Alexander Mikhailian, mikhailian@altern.org

v.0.1.4, 25 June 2000


Short guide in setting up Belarusian language support in Linux console, X Window System, web-browsers, text editors, etc. Charsets described are windows-1251, iso-8859-5 and koi8-ru. Belarusian characters can also be found in koi8-ub, koi8-c and of course, Unicode. Although this HOWTO is Linux-specific, many advices are applicable to other UNIX-like systems.

1. Introduction

2. System-wide setup

3. Editing texts

4. Browsers

5. Mailers

6. Further support


1. Introduction

1.1 History

This document was started in September 15, 1999 by Alexander Mikhailian

1.2 Comments

Comments on this HOWTO may be directed to the author mikhailian@altern.org.

1.3 New Versions

The newest version can always be found on http://www.bellinux.f2s.com

1.4 Copyright

This manual may be reproduced in whole or in part without restrictions.

1.5 Acknowledgements and Thanks

Thanks to everyone that gave comments as I was writing this.


2. System-wide setup

2.1 Choosing Charset

As for now, the best choice seems to be windows-1251. It gives the user compatibility with MS Windows which is a must-have for many of us. If you do not care about compatibility, iso-8859-5 is the best supported and easiest to set up.

Note that Belarusian support package from http://www.bellinux.f2s.com contains all the files mentioned in the present HOWTO unless otherwise stated in the text.

2.2 Windows-1251 in the kernel

Windows-1251 support in the kernel is needed mostly to visualize MS Windows filenames in Cyrillic with the console and X Window system localized in windows-1251. As latest FAT file systems store filenames in Unicode, we have to define the output charset of the Virtual File System layer. To apply the windows-1251 patch to the kernel:

2.3 Setting locale

2.4 Belarusian in console

Setting Belarusian with iso-8859-5

There are two ways to set up Belarusian with iso-8859-5

Look at the scripts by.iso and by2.iso for an example. This method has one serious drawback - you will loose all pseudographic characters and, say, you Midnight Commander will look somewhat naked. The second method described below preserves all pseudographic characters: Look at the scripts by.iso2 and by2.iso2 for an example. Also beware that different Linux distributions have different console-related packages - console-tools or kbd. Abovementioned scripts are meant to work with console-tools which is by far more popular.

Setting Belarusian with windows-1251

There is no windows-1251 console fonts and the only way to get it work is

Look at the script by2.win for an example.

Setting Belarusian with koi8-ru

There is no koi8-ru console fonts and the only way to get it work is

Look at the scripts by-stb.koi and byru-stb.koi for an example.

2.5 Belarusian in X Window System

Dirty hack:

Right solution:

A patch to XFree 3.3.5 and 4.0 from Aleksey Novodvorsky that allows the use of windows-1251 with XKB. The original location is at ftp.logic.ru/pub/logic/linux/be-locale but it is also available in Belarusian support package from http://www.bellinux.f2s.com. Lucky users of Linux-Mandrake RE get a patched XFree86 out of box.


3. Editing texts

3.1 Emacs

For most Linux distributions, emacs is able to display Belarusian characters out of box. However, the following conditions should satisfy:

The user may want to change the default keyboard layout ("input method" in emacs slang) to jcuken. This feature is provided by belarusian.el along with some other goodies. Read the comments in the beginning of belarusian.el for details.

3.2 Spell-checking

Getting belarusian ispell dictionary working with emacs is a bit tricky.

3.3 TeX

from Aleksey Novodvorsky:

You need TeX + babel + T2, e.g. teTeX >= 1.0. in order to get partial support for Belarusian,


4. Browsers

4.1 Netscape

It is often a problem to correctly visualize Belarusian-specific characters with Netscape. This is due to that last versions of Netscape look for any koi8-r font and, if they find one, they refuse to use other fonts for displaying Cyrillic pages.

The problem is solved by removing koi8-r fonts from everywhere - X Window System font path and font server path.Then install koi8-ru, iso-8859-5 or windows-1251 and run

 xset fp rehash
or restart X server. You will probably have to delete preferences and preferences.js from the Netscape home directory .netscape and even then you are not guaranteed to have Netscape work right. Netscape's handling of fonts has always been an obscure issue.

Links to koi8-ru, iso-8859-5 and windows-1251 cyrillic fonts for X Window System can be found at http://www.bellinux.f2s.com

4.2 Lynx

In order to view Belarusian sites, you have to set up you console to handle the encoding you need. See section Console for more details.

Add the following lines to your .linxrc file.

character_set=Cyrillic (windows-1251) preferred_language=be
preferred_charset=windows-1251

or

character_set=Cyrillic (ISO-8859-5) preferred_language=be
preferred_charset=iso-8859-5

If the page you are browsing does not have an explicit charset declaration, press "o" and set the document charset manually.


5. Mailers

5.1 Netscape Messenger

Netscape Messenger can not handle belarusian texts properly. The same applies to Mozilla.

5.2 Mutt

Mutt handles a multitude of charsets and encodings with ease. If your console has windows-1251 support, add the following lines to your .muttrc:

charset-hook "windows-1251" "cp1251" set
charset="windows-1251"

Mutt automatically converts all incoming messages for the screen output. It can also convert outgoing messages basing itself on a versatile pattern matching mechanism, e.g. the following line in .muttrc will force mutt to convert all messages sent to be-locale@iatp.unibel.by to koi8-r.

send-hook '~t ^be-locale@iatp\.unibel\.by$' 'set
send_charset="koi8-r"'


6. Further support

A mailing list devoted entirely to Belarusian language support is available at be-locale@iatp.unibel.by. To subscribe, send a message to majordomo@iatp.unibel.by with the string "subscribe be-locale youremailaddress" in the body of the message

Another mailing list that treats mostly linguistic issues is available at movaznaustva@egroups.com. To subscribe to it, send a message with empty body to movaznaustva-subscribe@egroups.com.