And if this isn't possible, what is the best practice for dealing with man pages derived from UTF-8-encoded POD?
The first thing to do in order to work with Unicode in POD is to use the directive
=encoding UTF-8
(as discussed here). The pod2text
and pod2html
tools will work fine and produce perfect UTF-8-encoded output.
The pod2man
tool, however, does not:
pod2man -u MyModule.pm | nroff -Tutf8 -man | less
Neither does perldoc
. Non-ASCII characters are all mangled or X-ed out. There is some inconclusive discussion on perlbug on whether this might be a bug in pod2man
or **roff*.
Since my module deals with Unicode specifically and is intended for distribution on CPAN, Unicode-enabled man pages are a must.
I am using Perl 5.14.2, perldoc 3.15, and *roff 1.21.