Please review for Man-DB changes

DJ Lucas dj at linuxfromscratch.org
Sat Oct 25 08:15:19 PDT 2008


DJ Lucas wrote:
> Alexander E. Patrakov wrote:
>   
>> DJ Lucas wrote:
>>   
>>     
>>> Many other distributions ignore the problem
>>> completely, leaving the end user with a mix of readable and
>>> unreadable manual pages, and even worse yet, unreadable error
>>> messages when a suitable manual page is not found.
>>>     
>>>       
>> "ignore the problem" => which problem? The text suggests that many 
>> distributions ignore that fact that different distributions have 
>> different policies. Some other word is needed. Maybe: "Many other 
>> distributions ignore the need for a consistent policy, leaving the user 
>> with ..."?
>>
>> "a mix of readable and unreadable manual pages" - yes, very well 
>> spotted, better than I formulated on this list! However, there is a very 
>> low-priority wish: some people will misinterpret the word "unreadable" 
>> as "no way to make the man program access this file" instead of "man 
>> reads this file and displays garbage". Here a picture would be worth 
>> thousand words, but pictures are not in the current LFS tradition.
>>
>> "and, even worse yet, unreadable error messages" => no, unreadable pages 
>> are worse. And this situation follows from a bug in the "man" program 
>> (it uses the obsolete catgets interface instead of gettext), not from 
>> misplaced or misencoded manual pages, so let's not mention it.
>>
>>   
>>     
> Many other distributions ignore the on disk encodings completely, 
> leaving the end user with a mix of improperly encoded manual pages.  
> When man encounters an unexpected encoding, it will display the contents 
> as configured, resulting in completely illegible text.
>
>   
>>> Man-DB uses a
>>> built-in table (see below) to find the correct serach directory for
>>> manual pages based on the user's locale settings.
>>>     
>>>       
>> No, it doesn't look into the table in this case. See add_nls_manpath() 
>> in http://www.chiark.greenend.org.uk/~cjwatson/bzr/man-db/trunk/src/manp.c
>>
>> It iterates over all subdirectories and tests whether the subdirectory 
>> is for the user's language, completely disregarding the encoding.
>>   
>>     
> ...ships with manual pages in legacy encodings.  Man-DB uses a built-in 
> table (see below) to determine the on disk encoding of the manual pages 
> found for a user's locale. If the directories found do not contain the 
> ".UTF-8" extension, Man-DB checks the table, and performs the necessary 
> conversion.  E.g., because of "UTF-8" in the directory name...
>
> -- DJ Lucas
>
>   
Some interesting reading in the source.  Looks like at least 
unpack_locale_bits() does not care what the codeset is, but it's checked 
in encodings.c. So:

...If the directories found do not contain an extension, Man-DB checks 
the table, and performs the necessary conversion. E.g., because of 
"UTF-8" extension in the directory name...

-- DJ Lucas


-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.




More information about the lfs-dev mailing list