man pages, groff, and utf8

From: Jia-Shiun Li <jiashiun_at_gmail.com>
Date: Sun, 19 Apr 2009 12:12:05 +0800
This is about the formatting in man pages.

I set LC_ALL to zh_TW.UTF8 in .cshrc.

recently I found there seems some strangeness in man pages. After a
close look I found that the dashes(minus signs) preceding options does
not look right.

utf-8: http://jiashiun.googlepages.com/Screenshot-utf8.png
without LC_ALL: http://jiashiun.googlepages.com/Screenshot-ascii.png
(note the dashes)

I did not know exactly what groff does but after some reading I knew
it is text formatting tool, with macros.

I think it is safe to say that groff expands some macro to
locale-dependent punctuations. The problem is, sometimes in the man
pages these punctuations are intended for code, keyboard input chars,
not for their textual meanings. If users (for example, I did)
copy-paste these text, they will not get correct result. Some part of
the man page text should have been in ASCII rather than
locale-symbols.

Here are some ideas:
Is it possible to add some macro to embrace these that needs no locale
conversion? or maybe a different set of macros for this kind of usage?
or special mode for man pages? I did not look into the macro sources,
so cannot tell how much man page macros and those for common text
relate.

A quick workaround is to alias 'man' to 'man -o'. It works well for
English man pages, but then user will not be able to read localized
ones.


Jia-Shiun.
Received on Sun Apr 19 2009 - 02:38:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:46 UTC