![]() | ![]() |
|
Belarusian-HOWTOAlexander Mikhailian, mikhailian@altern.orgv.0.1.5, 25 February 2001 Short guide in setting up Belarusian language support in Linux console, X Window System, web-browsers, text editors, etc. Charsets used in the setup are either windows-1251 or iso-8859-5. Belarusian characters can also be found in koi8-ub, koi8-c, koi8-ru and, of course, Unicode. Although this HOWTO is Linux-specific, many advices are applicable to other UNIX-like systems.
1. Introduction1.1. HistoryThis document was started in September 15, 1999 by Alexander Mikhailian 2. System-wide setup2.1. Choosing CharsetAs for now, the choice is mainly between windows-1251 and iso-8859-5. Windows-1251 provides compatibility with M$ Windows and it is is by far the most popular charset for nearly all slavic languages. On the other side, iso-8859-5 is better supported and easier to set up. The present HOWTO will explain the use of both charsets in parallel. Unless otherwise stated in the text, Belarusian support package from the bellinux page contains all the files mentioned in the present HOWTO. 2.2. windows-1251 in the kernelWindows-1251 support in the kernel is needed to visualize MS Windows filenames in cyrillic while the console and X Window system are 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 and install the support for windows-1251 in the kernel. There is a patch for 2.2.14 kernels that is included in the Belarusian support package. To apply the patch,
2.3. ISO-8859-5 in the kernelThere is built-in support for iso-8859-5 in Linux kernel. To enable iso-8859-5, make sure you compile this module in the nls section of the kernel setup. Normally, iso-8859-5 is compiled by default and can be loaded either automatically or by issuing
Add
2.4. Setting locale
2.5. Belarusian in console2.5.1. Setting Belarusian with windows-1251Some cyrillic console fonts are in fact russian fonts and lack many cyrillic characters. Fortunately, UniCyr fonts by Vadinm Zhitnikov have all the glyphs from cp866, cp1251, iso8859-5 and all printable symbols from koi8-r. Besides the belarusian keyboard maps which you can find at the the bellinux page , other files are fairly standard and are available in most linux distributions. To set up window-1251 in console,
2.5.2. Setting Belarusian with iso-8859-5There are two ways to set up Belarusian with iso-8859-5
2.6. Belarusian in X Window System2.6.1. ISO-8859-5 in X Window System through XKBThis is is quite easy to set up.
2.6.2. Windows-1251 in X Window System through XKBThis works only with XFree 4.0.2 and higher.
To use windows-1251 with XFree 3.3.5 and 4.0, you have to apply a patch 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 and it is also available from the bellinux page. Lucky users of Linux-Mandrake RE get a patched XFree86 out of box. Belarusian keyboard layout is palnned for all XFree releases after 4.0.2. To make it work, you will have to add the following lines into /etc/X11/XF86Config:
2.6.3. Windows-1251 in X Window System through Xmodmap
3. Editing texts3.1. EmacsEmacs is able to display Belarusian characters out of box in many Linux distributions. 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 on the setup procedure. After installing belarusian.el, you will be able to switch the input method, by typing C-\-cyrillic-belarusian-RET For a more user-friendly setup, put the following lines in the .emacs file:
3.2. Spell-checking
Getting belarusian ispell dictionary working with emacs is a bit tricky.
3.3. TeXfrom Aleksey Novodvorsky: You need TeX + babel + T2, e.g. teTeX >= 1.0. in order to get partial support for Belarusian,
4. Browsers4.1. NetscapeIt is often a problem to correctly visualize Belarusian-specific characters with Netscape. This is due to that Netscape 4.x looks for any koi8-r font and, if it finds 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
Links to koi8-ru, iso-8859-5 and windows-1251 cyrillic fonts for X Window System can be found at the bellinux page 4.2. LynxIn order to view Belarusian sites, you have to set up you console to handle the encoding you need. See section Section 2.5 for more details. Add the following lines to your .linxrc file.
If the page you are browsing does not have an explicit charset declaration, press o and set the document charset manually. 5. Mailers5.1. Netscape MessengerNetscape Messenger can not handle belarusian texts properly. The same applies to Mozilla. 5.2. MuttMutt handles a multitude of charsets and encodings with ease. If your console has windows-1251 support, add the following lines to your .muttrc:
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.
6. Further supportA 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. |