man(1) and locale codeset
Benjamin Lutz
mail at maxlor.com
Mon Oct 9 09:13:17 PDT 2006
Hello,
While investigating how to get proper quotes in manpages (proper as
explained here: http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html) I found
that groff outputs correct quote characters (well, for single quotation
marks anyway) with -Tutf8. When looking at the man(1) source code, I saw
that the code contains support for specifying a -T parameter based on the
codeset of the LC_ALL environment variable. See for example in
/usr/src/gnu/usr.bin/man/man/man.c:
- line 99, definition of ltable.
- line 956, appending of -T parameter to parameter list based on
locale_opts.
However, lines 1645-1646 and 1697-1698 (my src tree is from FreeBSD 6.2,
in case the lines differ look for "locale_opts = NULL") disable locale
codeset support completely, which cause man to revert to -Tascii. If I
comment out those 4 lines, I get UTF-8 manpages with correct single quote
characters.
What is the reason behind disabling locale support like this? Could this
be changed?
Cheers
Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061009/71c3762e/attachment.pgp
More information about the freebsd-hackers
mailing list