[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-devel:10477] man-db locale support



Hi.

In article <y5aso44qwm9.fsf@xxxxxxxxxxxxxxxxxxxx>, 
 on debian-devel@lists.debian.org, I wrote:

>  We are looking forward to new man-db coming with Japanese support :)

I have found that man-db_2.3.10-69j has been installed and it does
now support to display manpages written in Japanese. Wow!

Thank you for your effort, Fabrizio.

But if one set LANG environment to ja_JP.ujis, this man-db does not
search man/ja/ tree. So LANG=ja is required. 

I have found that following change is done between 2.3.10-69i 
and 2.3.10-69j:

@@ -778,8 +778,8 @@
                                internal_locale = "C";
        if ( internal_locale ) {
                internal_locale = xstrdup( internal_locale);
-               if (internal_locale[2] == '_' )
-                       internal_locale[2] = '\0';
+               /*if (internal_locale[2] == '_' )
+                       internal_locale[2] = '\0';*/
        }
 
 /* export argv, it might be needed when invoking the vendor supplied browser */


Why did you comment out these lines ? Many users who use Japanese
may set their LANG environment to ja_JP.ujis.

But if you think that each of ja_JP.ujis, ja_JP.jis, ja_JP.sjis is
different each other, and they should be treated differently, then
we should create directories: 
    /usr/share/man/{ja_JP.ujis,ja_JP.jis,ja_JP.sjis}
as well as /usr/share/man/ja.

I don't know which is better. I have heard that the symbolic link of 
/usr/man/ja_JP.ujis to /usr/man/ja is obsoleted and /usr/share/man/ja_JP.ujis
will not be created, 

But, FHS 2.0 included in debian-policy 3.0.1.1 describes:

# It maybe boring to you, but I don't know these ideas well now, 
# so I can't make assure which part is especially important,,,

4.8.2  /usr/share/man : Manual pages

(snip)

Manual pages are stored in <mandir>/<locale>/man<section>/<arch>.  An
explanation of <mandir>, <locale>, <section>, and <arch> is given below.

Provisions must be made in the structure of /usr/share/man to support
manual pages which are written in different (or multiple) languages.
These provisions must take into account the storage and reference of
these manual pages.  Relevant factors include language (including
geographical-based differences), and character code set.

This naming of language subdirectories of /usr/share/man is based on
Appendix E of the POSIX 1003.1 standard which describes the locale
identification string -- the most well-accepted method to describe a
cultural environment.  The <locale> string is:

     <language>[_<territory>][.<character-set>][,<version>]

The <language> field shall be taken from ISO 639 (a code for the
representation of names of languages).  It shall be two characters wide
and specified with lowercase letters only.

The <territory> field shall be the two-letter code of ISO 3166 (a
specification of representations of countries), if possible.  (Most
people are familiar with the two-letter codes used for the country codes
in email addresses.1) It shall be two characters wide and specified with
uppercase letters only.

The <character-set> field should represent the standard describing the
character set.  If the <character-set> field is just a numeric
specification, the number represents the number of the international
standard describing the character set.  It is recommended that this be a
numeric representation if possible (ISO standards, especially), not
include additional punctuation symbols, and that any letters be in
lowercase.

(snip)

Countries for which there is a well-accepted standard character code set
may omit the <character-set> field, but it is strongly recommended that
it be included, especially for countries with several competing
standards.

Various examples:


Language   Territory        Character Set     Directory
-------------------------------------------------------------------------
(snip)

Japanese   Japan            JIS               /usr/share/man/ja_JP.jis
Japanese   Japan            SJIS              /usr/share/man/ja_JP.sjis
Japanese   Japan            UJIS (or EUC-J)   /usr/share/man/ja_JP.ujis


In order to this documents, I feel that we should create /usr/share/man/ja_JP.ujis
for current manpages written in ja_JP.ujis coded Japanese.

# I checked that manpages under /usr/share/man/ja/, and found that most of them
# are written in ja_JP.ujis.

as just a shortcut, I create symbolic link ja_JP.ujis to ja under /usr/share/man
locally, then man-db_2.3.10-69j successfully find manpages under that tree.

I found dhelp_0.3.14 creates /usr/share/man/de_DE, but man-db_2.3.10-69j creates
/usr/share/man/de (as well as es and it) and does not touch de_DE.

and Examples in FHS 2.0:

Language   Territory        Character Set     Directory
-------------------------------------------------------------------------
English    --               ASCII             /usr/share/man/en
English    United Kingdom   ASCII             /usr/share/man/en_GB
English    United States    ASCII             /usr/share/man/en_US
French     Canada           ISO 8859-1        /usr/share/man/fr_CA
French     France           ISO 8859-1        /usr/share/man/fr_FR
German     Germany          ISO 646           /usr/share/man/de_DE.646
German     Germany          ISO 6937          /usr/share/man/de_DE.6937
German     Germany          ISO 8859-1        /usr/share/man/de_DE.88591
German     Switzerland      ISO 646           /usr/share/man/de_CH.646
Japanese   Japan            JIS               /usr/share/man/ja_JP.jis
Japanese   Japan            SJIS              /usr/share/man/ja_JP.sjis
Japanese   Japan            UJIS (or EUC-J)   /usr/share/man/ja_JP.ujis

So, then, what should we do ? Maybe manpages-ja creates the symbolic link 
(ja_JP.ujis -> ja) ? or man-db creates separate directories for 
many locales in the same way of `locales' package ?

# I don't know why `locale-ja' has not been merged into `locales' package,
# but it is another story,,,

I like to know the opinions of maintainers and users. Thanks.

-- 
  Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@xxxxxxxxxxx>