About 20 years after the invention of utf-8, I've decided to see what all the fuss is about and experiment with uxterm and whatnot. Naturally, this means I want to see sweet fancy quotes in all my man pages instead of the lame ``fake'' quotes. In order to convince mandoc to give me what I want, however, requires a command line option. But what about all those old school ascii only terminals I still sometimes use?
mandoc fortunately has an option -Tlocale, which will pick between ascii and utf8 based on environment. Perfect! Let's use it. Tested to work as expected in uxterm. Tested to change nothing in a regular xterm by default (no LC_CTYPE set). Index: man.conf =================================================================== RCS file: /cvs/src/etc/man.conf,v retrieving revision 1.18 diff -u -p -r1.18 man.conf --- man.conf 13 Jul 2013 20:21:52 -0000 1.18 +++ man.conf 14 Feb 2014 02:14:29 -0000 @@ -16,15 +16,15 @@ _subdir {cat,man}1 {cat,man}8 {cat,man} _suffix .0 _build .0.Z /usr/bin/zcat %s _build .0.gz /usr/bin/gzcat %s -_build .[1-9n] /usr/bin/mandoc %s -_build .[1-9n].Z /usr/bin/zcat %s | /usr/bin/mandoc -_build .[1-9n].gz /usr/bin/gzcat %s | /usr/bin/mandoc -_build .[1-9][a-z] /usr/bin/mandoc %s -_build .[1-9][a-z].Z /usr/bin/zcat %s | /usr/bin/mandoc -_build .[1-9][a-z].gz /usr/bin/gzcat %s | /usr/bin/mandoc -_build .tbl /usr/bin/mandoc %s -_build .tbl.Z /usr/bin/zcat %s | /usr/bin/mandoc -_build .tbl.gz /usr/bin/gzcat %s | /usr/bin/mandoc +_build .[1-9n] /usr/bin/mandoc -Tlocale %s +_build .[1-9n].Z /usr/bin/zcat %s | /usr/bin/mandoc -Tlocale +_build .[1-9n].gz /usr/bin/gzcat %s | /usr/bin/mandoc -Tlocale +_build .[1-9][a-z] /usr/bin/mandoc -Tlocale %s +_build .[1-9][a-z].Z /usr/bin/zcat %s | /usr/bin/mandoc -Tlocale +_build .[1-9][a-z].gz /usr/bin/gzcat %s | /usr/bin/mandoc -Tlocale +_build .tbl /usr/bin/mandoc -Tlocale %s +_build .tbl.Z /usr/bin/zcat %s | /usr/bin/mandoc -Tlocale +_build .tbl.gz /usr/bin/gzcat %s | /usr/bin/mandoc -Tlocale # Sections and their directories. # All paths ending in '/' are the equivalent of entries specifying that