develooper Front page | perl.perl5.porters | Postings from August 2008

Re: Re-gaining 'O's

Thread Previous | Thread Next
Russ Allbery
August 26, 2008 06:47
Re: Re-gaining 'O's
Message ID:
"H.Merijn Brand" <> writes:

> So, if the $LC_ALL and/or $LANG is set to something unicodish and
> #PERL_UNICODE is defined, shouldn't that be triggering this flag?
> That combination is clearly begging for the flag.

I don't think that implication works.  The problem is that the generated
*roff is not portable if you enable UTF-8 output.  That means that if you
generate man pages on one system with UTF-8 support and copy them
somewhere else (a very common use case for pod2man), the man pages you're
distributing may be very broken on that other system.

It's not a question of what Pod::Man internally does.  It understands
Unicode just fine.  The problem is that versions of nroff don't.  groff in
fact does not understand Unicode and does not support UTF-8 input; the
Linux distributions have just worked around this by internally doing
character set translation before passing the code to groff inside the man

I'm very sympathetic to the desire to support non-ASCII characters, but
doing so essentially creates non-portable man pages.  If that's what you
think is a good idea, then certainly Perl can take that step, but I want
to make sure that you're aware of the consequences.

It's probably easier to justify Perl's build process passing --utf8 on
systems known to support UTF-8 in man pages (Red Hat and Debian at least,
but possibly not all Linux's since it needs special support in the man
program) than to change the global default for Pod::Man.

Russ Allbery (             <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About