old-www/pub/Linux/docs/ldp-archived/mail_archives/ldp-discuss/msg03763.html

507 lines
17 KiB
HTML

<!-- MHonArc v2.5.0b2 -->
<!--X-Subject: Belarusian&#45;mini&#45;HOWTO -->
<!--X-From-R13: Oyrknaqre [vxunvyvna <zvxunvyvnaNnygrea.bet> -->
<!--X-Date: Tue, 29 Aug 2000 15:09:14 &#45;0400 (EDT) -->
<!--X-Message-Id: 20000829210835.A1703@econophone.be -->
<!--X-Content-Type: multipart/mixed -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
<html>
<head>
<title>Belarusian-mini-HOWTO</title>
<link rev="made" href="mailto:mikhailian@altern.org">
</head>
<body>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
<hr>
[<a href="msg03762.html">Date Prev</a>][<a href="msg03764.html">Date Next</a>][<a href="msg03788.html">Thread Prev</a>][<a href="msg03775.html">Thread Next</a>][<a href="maillist.html#03763">Date Index</a>][<a href="threads.html#03763">Thread Index</a>]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<h1>Belarusian-mini-HOWTO</h1>
<hr>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<ul>
<li><em>To</em>: <A HREF="mailto:ldp-discuss@lists.linuxdoc.org">ldp-discuss@lists.linuxdoc.org</A></li>
<li><em>Subject</em>: Belarusian-mini-HOWTO</li>
<li><em>From</em>: Alexander Mikhailian &lt;<A HREF="mailto:mikhailian@altern.org">mikhailian@altern.org</A>&gt;</li>
<li><em>Date</em>: Tue, 29 Aug 2000 21:08:35 +0200</li>
<li><em>Resent-date</em>: Tue, 29 Aug 2000 15:09:14 -0400 (EDT)</li>
<li><em>Resent-from</em>: <A HREF="mailto:ldp-discuss@lists.debian.org">ldp-discuss@lists.debian.org</A></li>
<li><em>Resent-message-id</em>: &lt;NGsjzC.A.i_H.sqAr5@murphy&gt;</li>
<li><em>Resent-sender</em>: <A HREF="mailto:ldp-discuss-request@lists.debian.org">ldp-discuss-request@lists.debian.org</A></li>
<li><em>User-agent</em>: Mutt/1.2i</li>
</ul>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<hr>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<pre>
There were a lot of discussions over the Russian-speaking
Internet about the old Cyrillic-HOWTO that should be moved
to the unmaintained area and Evgenij Baldin even started
a new version which includes a lot of info from various
sources &lt;<A HREF="http://www.inp.nsk.su/~baldin">http://www.inp.nsk.su/~baldin</A>&gt;.
However the old Cyrillic-HOWTO from Alexander L. Belikoff
and the new one from Evgenij Baldin are actually aimed at
Russian-speaking users and do not give a hint for Ukrainians,
Belarusian, Bulgarians, etc.,
I have had a Belarusian-mini-HOWTO for about 1 year
but I never tried to submit it to the LDP for various
reasons, mainly because there were very few Linux users
that were interested in Belarusian language. But as I
receive more and more letters about Belarusian in Linux
now, I decided to present the Belarusian-mini-HOWTO to the
LDP list.
Unfortunately the HOWTO is still in the old linuxdoc format.
--
Alexander Mikhailian
</pre>
<pre>
&lt;!doctype linuxdoc system&gt;
&lt;article&gt;
&lt;title&gt;Linux Belarusian mini-HOWTO &lt;author&gt;Alexander Mikhailian,
mikhailian@altern.org &lt;date&gt;v.0.1.4, 25 June 2000
&lt;abstract&gt;
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.
&lt;/abstract&gt;
&lt;toc&gt;
&lt;sect&gt;Introduction
&lt;sect1&gt; History
&lt;p&gt;
This document was started in September 15, 1999 by Alexander Mikhailian
&lt;sect1&gt;Comments
&lt;p&gt;
Comments on this HOWTO may be directed to the author &lt;htmlurl
url=&quot;<A HREF="mailto:mikhailian@altern.org&quot">mailto:mikhailian@altern.org&quot</A>; name=&quot;mikhailian@altern.org&quot;&gt;.
&lt;sect1&gt;New Versions
&lt;p&gt;
The newest version can always be found on &lt;htmlurl
url=&quot;<A HREF="http://www.bellinux.f2s.com/&quot">http://www.bellinux.f2s.com/&quot</A>; name=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>;&gt;
&lt;sect1&gt;Copyright
&lt;p&gt;
This manual may be reproduced in whole or in part without restrictions.
&lt;sect1&gt;Acknowledgements and Thanks
&lt;p&gt;
Thanks to everyone that gave comments as I was writing this.
&lt;sect&gt;System-wide setup
&lt;sect1&gt;Choosing Charset
&lt;p&gt;
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.
&lt;p&gt;
Note that Belarusian support package from &lt;htmlurl
url=&quot;<A HREF="http://www.bellinux.f2s.com/&quot">http://www.bellinux.f2s.com/&quot</A>; name=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>;&gt;
contains all the files mentioned in the present HOWTO unless otherwise
stated in the text.
&lt;sect1&gt;Windows-1251 in the kernel
&lt;p&gt;
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:
&lt;itemize&gt;
&lt;item&gt;
&lt;tscreen&gt;
&lt;verb&gt;
cd /path_to_your_kernel_source_tree
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;item&gt;
&lt;tscreen&gt;
&lt;verb&gt;
patch -p0 &amp;lt your_patch.patch
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;item&gt;
Recompile and reinstall the kernel. Refer to &lt;em/Kernel-HOWTO/ about the details.
&lt;item&gt;
Add `codepage=866,iocharset=microsoft-cp1251' to your mount options in
order to get the filenames in windows-1251.
&lt;/itemize&gt;
&lt;sect1&gt;Setting locale
&lt;p&gt;
&lt;itemize&gt;
&lt;item&gt;Do
&lt;tscreen&gt;
&lt;verb&gt;
localedef -f CP1251 -i be_BY be_BY
&lt;/verb&gt;
&lt;/tscreen&gt;
or
&lt;tscreen&gt;
&lt;verb&gt;
localedef -f ISO8899-5 -i be_BY be_BY
&lt;/verb&gt;
&lt;/tscreen&gt;
to compile the locale in windows-1251 encoding or iso-8859-5 encoding.
&lt;item&gt; Check how it works by setting LANG=be_BY and running a
locale-aware program like &lt;em/date/ or &lt;em/cal/.
&lt;/itemize&gt;
&lt;sect1&gt;Belarusian in console&lt;label id=&quot;Console&quot;&gt;
&lt;sect2&gt;Setting Belarusian with iso-8859-5
&lt;p&gt;
There are two ways to set up Belarusian with iso-8859-5
&lt;itemize&gt;
&lt;item&gt; Load iso-8859-5 font &lt;item&gt; Load &lt;em/by2.kmap/ keymap or
&lt;em/by.kmap/ &lt;/itemize&gt; 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:
&lt;itemize&gt;
&lt;item&gt;Load UniCyr font &lt;item&gt;Load &lt;em/by2.kmap/ keymap or &lt;em/by.kmap/
&lt;item&gt;Load Application-Charset Map &lt;em/iso05.acm/
&lt;/itemize&gt;
Look at the scripts by.iso2 and by2.iso2 for an example. Also beware
that different Linux distributions have different console-related
packages - &lt;em/console-tools/ or &lt;em/kbd/. Abovementioned scripts are
meant to work with &lt;em/console-tools/ which is by far more popular.
&lt;sect2&gt;Setting Belarusian with windows-1251
&lt;p&gt;
There is no windows-1251 console fonts and the only way to get it work
is
&lt;itemize&gt;
&lt;item&gt; Load UniCyr font &lt;item&gt; Load &lt;em/by2.kmap/ keymap or
&lt;em/by.kmap/ &lt;item&gt; Load Application-Charset Map &lt;em/cp1251.acm/
&lt;/itemize&gt;
Look at the script by2.win for an example.
&lt;sect2&gt;Setting Belarusian with koi8-ru
&lt;p&gt;
There is no koi8-ru console fonts and the only way to get it work
is
&lt;itemize&gt;
&lt;item&gt; Load UniCyr font
&lt;item&gt; Load &lt;em/by-stb.koi.kmap/ keymap or &lt;em/byru-stb.koi.kmap/
&lt;item&gt; Load Application-Charset Map &lt;em/koi8-ru.acm/
&lt;/itemize&gt;
Look at the scripts by-stb.koi and byru-stb.koi for an example.
&lt;sect1&gt;Belarusian in X Window System&lt;label id=&quot;X Window&quot;&gt;
&lt;p&gt;
Dirty hack:
&lt;itemize&gt;
&lt;item&gt; 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. &lt;item&gt; Make and
install xruskb package which can be downloaded from &lt;htmlurl
url=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>; name=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>;&gt;
&lt;item&gt; Replace .xmm files in your xruskb directory by those found in
the folder modified_keymaps of belarusian-0.1.tar.gz distribution.
&lt;item&gt; Add the following lines in your ~/.Xdefaults file
&lt;tscreen&gt;
&lt;verb&gt; xrus*modeButton1.labelString: BEL xrus*modeButton1.label: BEL
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;item&gt;Run
&lt;tscreen&gt;
&lt;verb&gt;xrus jcuken-cp1251&lt;/verb&gt;
&lt;/tscreen&gt;
or
&lt;tscreen&gt;
&lt;verb&gt;xrus jcuken-iso5&lt;/verb&gt;
&lt;/tscreen&gt;
to start keyboard switcher.
&lt;/itemize&gt;
&lt;p&gt;
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 &lt;htmlurl
url=&quot; ftp.logic.ru/pub/logic/linux/be-locale&quot; name=&quot;
ftp.logic.ru/pub/logic/linux/be-locale&quot;&gt; but it is also available in
Belarusian support package from &lt;htmlurl url=&quot;<A HREF="http://www.bellinux.f2s.com/&quot">http://www.bellinux.f2s.com/&quot</A>;
name=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>;&gt;. Lucky users of Linux-Mandrake RE
get a patched XFree86 out of box.
&lt;sect&gt; Editing texts
&lt;sect1&gt; Emacs &lt;label id=&quot;Emacs&quot;&gt;
&lt;p&gt;
For most Linux distributions, emacs is able to display Belarusian
characters out of box. However, the following conditions should
satisfy:
&lt;itemize&gt;
&lt;item&gt;
Cyrillic iso-8859-5 fonts should be properly installed.
&lt;item&gt;
Emacs-mule package should be installed.
&lt;/itemize&gt;
&lt;p&gt;
The user may want to change the default keyboard layout (&amp;quot;input
method&amp;quot; in emacs slang) to jcuken. This feature is provided by
&lt;em/belarusian.el/ along with some other goodies. Read the comments
in the beginning of &lt;em/belarusian.el/ for details.
&lt;sect1&gt;Spell-checking&lt;label id=&quot;Spell-checking&quot;&gt; &lt;p&gt;
&lt;itemize&gt;
&lt;item&gt; If you do not have ispell 3.1.20, install it from any Linux
distribution CD. &lt;item&gt; Download the package belspell.tar.gz.
Unpack it and run
&lt;tscreen&gt;
&lt;verb&gt;
buildhash belarusian.sml belarusian.aff belarusian.hash
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;item&gt; Copy belarusian.hash to /usr/lib/ispell or wherever your ispell
hash tables are. &lt;item&gt; in order to spell-check a file, type
&lt;tscreen&gt;
&lt;verb&gt;
ispell -d belarusian yourfile.txt
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;/itemize&gt;
&lt;p&gt;
Getting belarusian ispell dictionary working with emacs is a bit
tricky.
&lt;itemize&gt;
&lt;item&gt; Copy &lt;em/ispell.el/ and &lt;em/ispell.elc/ into your
`$EMACSBIN/../lisp' directory. &lt;item&gt; Copy temporarily
`$EMACSBIN/../lisp/loaddefs.el' to
`/usr/src/emacs-XX.X/lisp/loaddefs.el' where XX.X stand for emacs
version number.&lt;item&gt; Do `M-x
update-file-autoloads RET' and enter the path to the ispell.el.
&lt;item&gt; Copy back &lt;em/loaddefs.el/ &lt;item&gt; Restart emacs
&lt;/itemize&gt;
&lt;sect1&gt; TeX
&lt;p&gt;
from Aleksey Novodvorsky:
&lt;p&gt;
You need TeX + babel + T2, e.g. teTeX &gt;= 1.0. in order to get partial
support for Belarusian,
&lt;itemize&gt;
&lt;item&gt;put &lt;em/babel.sty/, &lt;em/belarusianb.ldf/ and
&lt;em/belarusianb.sty/ into
&amp;quot;/usr/share/texmf/tex/generic/babel&amp;quot; &lt;item&gt; run
&amp;quot;texhash&amp;quot; &lt;item&gt; To use Belarusian in LaTeX: add the
following lines in the preamble:
&lt;tscreen&gt;
&lt;verb&gt;
\documentclass[belarusian]{article} \usepackage[cp1251]{inputenc}
\usepackage{babel}
&lt;/verb&gt;
&lt;/tscreen&gt;
or
&lt;tscreen&gt;
&lt;verb&gt;
\documentclass[belarusian]{article} \usepackage[iso88595]{inputenc}
\usepackage{babel}
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;/itemize&gt;
&lt;sect&gt;Browsers
&lt;sect1&gt;Netscape
&lt;p&gt;
It is often a problem to correctly visualize Belarusian-specific
characters with Netscape. This is due to that last versions of
Netscape look for &lt;em/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
&lt;tscreen&gt;
&lt;verb&gt;
xset fp rehash
&lt;/verb&gt;
&lt;/tscreen&gt;
or restart X server. You will probably have to delete &lt;em/preferences/
and &lt;em/preferences.js/ from the Netscape home directory
&lt;em/.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
&lt;htmlurl url=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>;
name=&quot;<A HREF="http://www.bellinux.f2s.com&quot">http://www.bellinux.f2s.com&quot</A>;&gt;
&lt;sect1&gt;Lynx
&lt;p&gt;
In order to view Belarusian sites, you have to set up you console to
handle the encoding you need. See section &lt;ref id=&quot;Console&quot;&gt; for more
details.
&lt;p&gt;
Add the following lines to your &lt;em/.linxrc/ file.
&lt;tscreen&gt;
&lt;verb&gt;
character_set=Cyrillic (windows-1251) preferred_language=be
preferred_charset=windows-1251
&lt;/verb&gt;
&lt;/tscreen&gt;
or
&lt;tscreen&gt;
&lt;verb&gt;
character_set=Cyrillic (ISO-8859-5) preferred_language=be
preferred_charset=iso-8859-5
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;p&gt;
If the page you are browsing does not have an explicit charset
declaration, press &amp;quot;o&amp;quot; and set the document charset
manually.
&lt;sect&gt; Mailers
&lt;sect1&gt; Netscape Messenger
&lt;p&gt;
Netscape Messenger can not handle belarusian texts properly. The same
applies to Mozilla.
&lt;sect1&gt; Mutt
&lt;p&gt;
Mutt handles a multitude of charsets and encodings with ease. If your
console has windows-1251 support, add the following lines to your
&lt;em/.muttrc/:
&lt;tscreen&gt;
&lt;verb&gt;
charset-hook &amp;quot;windows-1251&amp;quot; &amp;quot;cp1251&amp;quot; set
charset=&amp;quot;windows-1251&amp;quot;
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;p&gt;
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
&lt;em/.muttrc/ will force mutt to convert all messages sent to
be-locale@iatp.unibel.by to &lt;em/koi8-r/.
&lt;tscreen&gt;
&lt;verb&gt;
send-hook '~t ^be-locale@iatp\.unibel\.by$' 'set
send_charset=&amp;quot;koi8-r&amp;quot;'
&lt;/verb&gt;
&lt;/tscreen&gt;
&lt;sect&gt; Further support
&lt;p&gt;
A mailing list devoted entirely to Belarusian language support is
available at &lt;htmlurl url=&quot;<A HREF="mailto:be-locale@iatp.unibel.by&quot">mailto:be-locale@iatp.unibel.by&quot</A>;
name=&quot;be-locale@iatp.unibel.by&quot;&gt;. To subscribe, send a message to
&lt;htmlurl url=&quot;<A HREF="mailto:majordomo@iatp.unibel.by&quot">mailto:majordomo@iatp.unibel.by&quot</A>;
name=&quot;majordomo@iatp.unibel.by&quot;&gt; with the string &amp;quot;subscribe
be-locale youremailaddress&amp;quot; in the body of the message
&lt;p&gt;
Another mailing list that treats mostly linguistic issues is available
at &lt;htmlurl url=&quot;<A HREF="mailto:movaznaustva@egroups.com&quot">mailto:movaznaustva@egroups.com&quot</A>;
name=&quot;movaznaustva@egroups.com&quot;&gt;. To subscribe to it, send a message
with empty body to &lt;htmlurl
url=&quot;<A HREF="mailto:movaznaustva-subscribe@egroups.com&quot">mailto:movaznaustva-subscribe@egroups.com&quot</A>;
name=&quot;movaznaustva-subscribe@egroups.com&quot;&gt;.
&lt;/article&gt;
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="03775" href="msg03775.html">Re: Belarusian-mini-HOWTO</a></strong>
<ul><li><em>From:</em> abel@vallinor4.com (Alexander L. Belikoff)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg03762.html">Re: Need a reviewer</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg03764.html">Re: Need a reviewer</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg03788.html">Re: Need a reviewer</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg03775.html">Re: Belarusian-mini-HOWTO</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#03763"><strong>Date</strong></a></li>
<li><a href="threads.html#03763"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>