Subject: Re: lib/33090: patch for new locales: ru_BY.CP1251, ru_RU.CP1251 and be_BY.CP1251
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Takehiko NOZAKI <th-nozaki@netwrk.co.jp>
List: netbsd-bugs
Date: 03/16/2006 12:20:05
The following reply was made to PR lib/33090; it has been noted by GNATS.
From: Takehiko NOZAKI <th-nozaki@netwrk.co.jp>
To: cheusov@tut.by
Cc: gnats-bugs@netbsd.org
Subject: Re: lib/33090: patch for new locales: ru_BY.CP1251, ru_RU.CP1251 and be_BY.CP1251
Date: Thu, 16 Mar 2006 21:27:33 +0900
hi,
> Can anybody apply a small patch to libc,
> building a few new locales for Russian and Belarusian
> languages?
I had already committed your patch with some modification, thanks.
http://mail-index.netbsd.org/source-changes/2006/03/14/0018.html
please checkout latest CVS HEAD.
> Actually I just copy subpart of bg_BG.CP1251 file
> to charset/CP1251 file and "#include" it
> from new locates ctype/ files.
src/share/locale/ctype/charset/* is for ISO-2022-* locale,
i think other locale should be independent from those.
> P.S.
> What do such lines mean?
see man 1 mklocale.
this CHARSET token set bit and mask to localesrc's character index
to convert from/to wchar_t.
for more detailed information about ISO-2022 wchar_t mapping,
see src/lib/libc/citrus/modules/cirus_iso2022.c.
> All files in $SRC/share/locale/ctype/charset
> contains this magic, my patch doesn't add it.
> man mklocale says
> "CHARSET Controls character set for subsequent runes"
> The above magic symbols are not clear enough for me :-(
>
this token's string means ISO/IEC 2022 escape sequence.
> CHARSET ",A"
`,' is 96(0x20-0x7F) charset.
`A' is final-byte of ISO-2022 escape sequence, means ISO 8859-1:GR
> CHARSET "(I"
`(' is 94(0x21-0x7E) charset.
`I' is for japanese JISX0201.
> CHARSET "$(@"
`$' means this is multibyte charset.
`@' is for japanese JISX 0208-1978.
for more detailed information about ISO/IEC 2022,
read following documentation:
http://www.ecma-international.org/publicaions/files/ECMA-ST/Ecma-035.pdf
http://www.itscj.ipsj.or.jp/ISO-IR/
truly yours.
--
Takehiko NOZAKI<tnozaki@netbsd.org>