Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2006 18:13:07 +0200
From:      Benjamin Lutz <mail@maxlor.com>
To:        freebsd-hackers@freebsd.org
Subject:   man(1) and locale codeset
Message-ID:  <200610091813.10453.mail@maxlor.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQBFKnUWzZEjpyKHuQwRAvE8AJ0cs9xXNWBzMkZ5nV7O+gBUCutSdwCfXUIn
Rngm07PUzDwYiqQLMWBCLgc=
=9JFd
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610091813.10453.mail>