Date: Sun, 19 Apr 2009 12:12:05 +0800 From: Jia-Shiun Li <jiashiun@gmail.com> To: freebsd-current@freebsd.org Subject: man pages, groff, and utf8 Message-ID: <1d6d20bc0904182112o793f6299x52504ed63dcc4237@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1d6d20bc0904182112o793f6299x52504ed63dcc4237>