Ocenite etot tekst:


---------------------------------------------------------------
 Avtory instrukcii:
 Konstantin Belozerov (kbeloz@dol.ru), http://kbeloz.narod.ru
 http://www.livejournal.com/users/kbeloz/
 Aleksandr Volobuev (alxvol@dol.ru)
 Date: 10 Mar 2000
---------------------------------------------------------------

     Annotaciya

     Nizhe   privoditsya  opisanie  "pochti  chestnoj"  rusifikacii  OpenMail'a.
"Pochti" -  potomu chto  pri  dannom sposobe OpenMail hranit  soobshcheniya vnutri
sebya v win-1251, no ostaetsya  uveren, chto eto -- ISO8859-1. Esli  kto-nibud'
iz  chitatelej mozhet ob®yasnit',  kak ob®yavit' OpenMail'u i ego klientam,  chto
ispol'zuemaya vnutrennyaya kodirovka est' 1251, soobshchite nam, pozhalujsta.
     Priznat'sya, my do sih por  ne ponimaem, kak vse  eto dolzhno rabotat'  v
ideal'nom  sluchae. Dannaya metodika  poyavilas'  kak ona  est'  ot  nedostatka
vremeni i  zhelaniya  razbirat'sya  doskonal'no --  rassmatrivaemyj produkt  ne
vpolne to, chemu hotelos' by posvyatit' ostatok zhizni :).
     Tekst  napisan  kak  tupaya  instrukciya.  Kto  hochet  razobrat'sya,   kak
sostavlyayutsya  tablicy perekodirovki i pochemu  nomera charset'ov nachinayutsya s
1500 -- you are welcome, v man'ah i kommentariyah v fajlah ot Hewlett-Packard
vse napisano. Kto razbirat'sya ne hochet -- siya instrukciya pomozhet.
     Opisyvaetsya  sleduyushchaya  situaciya  --  vse  ishodyashchie   vo  vneshnij  mir
soobshcheniya  preobrazovyvayutsya v koi8-r, vhodyashchie  iz vneshnego mira v formatah
koi8r, iso8859-5, cp866, koi8-u preobrazovyvayutsya v win-1251 dlya Outlook'a -
kak  nam  kazhetsya,  naibolee  tipichnaya  na  segodnya konfiguraciya  (mozhet, za
isklyucheniem koi8-u :-)).
     Vezde dalee ~ - eto katalog /var/opt/openmail. Poehali.

     Zaregistrirovat' kodirovki v ~/sys/CSInfo.cfg

     Zaregistrirovat' kodirovki v ~/sys/CSInfo.cfg
     Izmenit' nomer versii VERSION = 2
     Napisat':
     CHARSET_NAME = WIN_1251
     CHARSET_NUMBER = 1500
     INTERCHANGE = yes

     CHARSET_NAME = KOI8_R
     CHARSET_NUMBER = 1501
     INTERCHANGE = yes

     CHARSET_NAME = ISO8859_5
     CHARSET_NUMBER = 1502
     INTERCHANGE = yes

     CHARSET_NAME = CP866
     CHARSET_NUMBER = 1503
     INTERCHANGE = yes

     CHARSET_NAME = KOI8_U
     CHARSET_NUMBER = 1504
     INTERCHANGE = yes

     Zaregistrirovat' kodirovki v ~/sys/CharMap

     Zaregistrirovat' kodirovki v ~/sys/CharMap
     OMCHAR=WIN_1251
     OMSTDID=1500

     OMCHAR=KOI8_R
     OMSTDID=1501

     OMCHAR=ISO8859_5
     OMSTDID=1502

     OMCHAR=CP866
     OMSTDID=1503

     OMCHAR=KOI8_U
     OMSTDID=1504


     Propisat' sootvetstvie mezhdu zaregistrirovannymi kodirovkami OpenMail i
kodirovkami MIME v ~/sys/mime.cs

     Propisat' sootvetstvie mezhdu zaregistrirovannymi kodirovkami OpenMail i
kodirovkami MIME v ~/sys/mime.cs
     Napisat' (podumav o  tom, chto v pole  charset pishut mejlery, s kotorymi
vam  prihoditsya  rabotat'  -- so  vsemi sumasshedshimi spravit'sya  nel'zya,  no
postarat'sya stoit, ne tak li?):
     KOI8_R koi8-r
     ISO8859_5 iso-8859-5
     CP866 cp866
     WIN_1251 windows-1251
     KOI8_U koi8-u
     I t.p.

     Ukazat' perekodirovku v ~/sys/mimeout.str

     Ukazat' perekodirovku v ~/sys/mimeout.str
     Zakommentirovat' stroku posle slov # Preserve ISO 8859 text
     Napisat'
     1167.ISO8859_1 1167.KOI8_R R

     Sozdat' ~/sys/mimein.str

     Sozdat' ~/sys/mimein.str
     Skopirovat'  v  mimein.str  fajl  mimeout.str,  izmenit'   zagolovok  i
napisat'
     1167.WIN_1251 1167.ISO8859_1 R
     1167.KOI8_R 1167.ISO8859_1 R
     1167.CP866 1167.ISO8859_1 R
     1167.ISO8859_5 1167.ISO8859_1 R
     1167.KOI8_U 1167.ISO8859_1 R

     Podlozhit'   fajly    iz    omcyrenc.tar    (prilagaetsya)    v   katalog
~/csetconvPodlozhit' fajly iz omcyrenc.tar (prilagaetsya) v katalog ~/csetconv

     Udalit' ~/sys/CSTables.ld, ~/sys/LCMap.bin
     Vypolnit'

     Udalit' ~/sys/CSTables.ld, ~/sys/LCMap.bin
     Vypolnit'
     omconfsm -f CSInfo.cfg
     omconfsm --f CharMap
     omconfsm --f CSTables.ld
     omconfsm --f LCMap.bin
     omconfsm --f csetconv[AV1][KBB2]


     Perezapustit' OpenMail,  ne verya  utverzhdeniyam,  chto posle perestroeniya
shared memory (omconfsm) vse zarabotaet. Ne zarabotaet, perezapustite.

     Vse.


     Primechaniya dlya teh, komu ne spitsya.

     Primechaniya dlya teh, komu ne spitsya.
     Eshche  odin  fajl,  kotoryj  nado  by  popravit',  nahoditsya  v  kataloge
~/upper[AV3]. Zachem ego pravit', ne vpolne yasno, tak kak neizvestno, v kakih
situaciyah  OpenMail   proizvodit  preobrazovanie  iz  strochnyh   simvolov  v
propisnye. No, poskol'ku nasha  8859-1 na samom dele 1251, pravim  fajl 500.s
(pravki nemnogo, kto zahochet, tot razberetsya) i vytiraem fajl 500.b.
     Prilagaemye fajly perekodirovok  polucheny sovershenno  mehanicheski putem
perekrestnogo sopostavleniya sootvetstvuyushchih  kodovyh  tablic cherez  Unicode.
Simvoly, otsutstvuyushchie v celevoj tablice, prevrashchayutsya v voprositel'nyj znak
0x3F.  Estestvenno,  pri  etom  ignoriruetsya  to,  chto nekotorye  ideogrammy
ishodnoj tablicy pri tvorcheskom podhode mogut byt' preobrazovany v hotya i ne
identichnye, no shodnye ideogrammy  celevoj (naprimer, psevdografika iz koi i
866 pri perekodirovanii v 1251 --  v simvoly  '-', '|' i t.p.). Est' prostor
dlya deyatel'nosti.
     Kompilyaciyu  tekstovyh  tablic  iz  csetconv  i   upper[AV4]  proizvodit
programma  omconfsm, kotoraya ochen' ploho  otnositsya  k  ne priglyanuvshimsya ej
ishodnym  dannym.  V  chastnosti,  vyyasnilos', chto  shestnadcatirichnye  cifry,
bol'shie devyati, dolzhny byt' napisany isklyuchitel'no malen'kimi bukvami (0xab,
no ne 0xAB). Fajl,  v kotorom omconfsm pomereshchilas'  oshibka, ignoriruetsya, a
po zapisyam v loge  nichego ponyat' nel'zya. Takoe vpechatlenie, chto vse eto delo
pisali vcherashnie shkol'niki :(
     Vytyazhka iz  dokumenta IANA po povodu dopustimyh nazvanij  kirillicheskih
charset'ov (to est' chto pri nekotorom fanatizme mozhno napisat' v mime.cs. My
ne stali):

     Name: KOI8-R (preferred MIME name)
     Alias: csKOI8R

     Name: windows-1251

     Name: ISO_8859-5:1988
     Alias: iso-ir-144
     Alias: ISO_8859-5
     Alias: ISO-8859-5 (preferred MIME name)
     Alias: cyrillic
     Alias: csISOLatinCyrillic

     Name: IBM866
     Alias: cp866
     Alias: 866
     Alias: csIBM866

     Name: KOI8-U

     [AV1] Esli perezapuskat' vse polnost'yu, to etot shag lishnij.
     [KBB2]Ty  gde  eto  proveryal? Po  moim  nablyudeniyam,  bez  oboih  shagov
plohovato.
     [AV3] Ili toupper? Vot etogo ne pomnyu, i posmotret' vozmozhnosti net.
     [AV4] Eshche odno upominanie upper.



Tablicy perekodirovok dlya kirilizacii OpenMail (omcyrenc.tar, 20Kb)

Last-modified: Mon, 12 Apr 2004 20:13:18 GMT
Ocenite etot tekst: