Products
and Services Support
and Docs Training Partner Programs About Red
Hat
  download storecart
red hat logo
redhat.comredhat network

Red Hat Documentation

Overview | HOWTOs | mini-HOWTOs | FAQs | Linux Man-Pages

Linux Belarusian HOWTO : System-wide setup Next Previous Contents

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:

  •  cd /path_to_your_kernel_source_tree
    
  •  patch -p0 < your_patch.patch
    
  • Recompile and reinstall the kernel. Refer to Kernel-HOWTO about the details.
  • Add `codepage=866,iocharset=microsoft-cp1251' to your mount options in order to get the filenames in windows-1251.

2.3 Setting locale

  • Do
    localedef -f CP1251 -i be_BY be_BY
    
    or
    localedef -f ISO8899-5 -i be_BY be_BY
    
    to compile the locale in windows-1251 encoding or iso-8859-5 encoding.
  • Check how it works by setting LANG=be_BY and running a locale-aware program like date or cal.

2.4 Belarusian in console

Setting Belarusian with iso-8859-5

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

  • Load iso-8859-5 font
  • Load by2.kmap keymap or by.kmap
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:
  • Load UniCyr font
  • Load by2.kmap keymap or by.kmap
  • Load Application-Charset Map iso05.acm
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

  • Load UniCyr font
  • Load by2.kmap keymap or by.kmap
  • Load Application-Charset Map cp1251.acm
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

  • Load UniCyr font
  • Load by-stb.koi.kmap keymap or byru-stb.koi.kmap
  • Load Application-Charset Map koi8-ru.acm
Look at the scripts by-stb.koi and byru-stb.koi for an example.

2.5 Belarusian in X Window System

Dirty hack:

  • Install Cyrillic fonts for X Windows. You can only use iso-8859-5, koi8-ru and microsoft-1251. BTW, there is a big difference between koi8-ru and koi8-r. The latest does not have CYRILLIC LETTER BYELORUSSIAN-UKRAINIAN I and CYRILLIC LETTER SHORT U.
  • Make and install xruskb package which can be downloaded from http://www.bellinux.f2s.com
  • Replace .xmm files in your xruskb directory by those found in the folder modified_keymaps of belarusian-0.1.tar.gz distribution.
  • Add the following lines in your  /.Xdefaults file
     xrus*modeButton1.labelString: BEL xrus*modeButton1.label: BEL
    
  • Run
    xrus jcuken-cp1251
    
    or
    xrus jcuken-iso5
    
    to start keyboard switcher.

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.


Next Previous Contents

 

 


 
© 2001 Red Hat, Inc. All rights reserved.
About Red Hat  :  Legal statement  :  Privacy statement  :  Y2K statement  :  Contact Red Hat