Bug#738189: perldoc does not respect the user locale
Russ Allbery
rra at debian.org
Sat Nov 26 17:08:16 GMT 2022
Klaus Ethgen <Klaus at Ethgen.de> writes:
> When I have this small perl file:
> ---
> =head1 TEST
> =over
> =item
> Test
> =item
> Test
> =back
> ---
> And using "perldoc file.pl", I get the output:
> ...
> · Test
> ...
> This is the UTF-8 representation of a "·". But I do not have UTF-8 at
> all and also my locales (see below) tells this. Also the file is no
> UTF-8 than latin1. (Well, in this test case it it ASCII 7bit.)
This bug was from quite some time ago (eight years), and I think it dates
from when perldoc was using Pod::Man and nroff by default. Pod::Man uses
the \(bu character escape, so I think this bug was actually an nroff bug
rather than a Perl or perldoc bug, although it may have been a problem
with the flags that perldoc passed to nroff.
However, more to the point, perldoc was switched to use Pod::Text by
default some time ago, so you now have to use "-n nroff" to get this
behavior. Pod::Text does not attempt to use any fancy bullets (it just
uses "*"), so you should no longer see this problem by default. I think
it may therefore be worth closing as fixed by default, although it's still
possible to get the nroff output.
I tried to test whether nroff still did the same thing in an ISO 8859-1
locale, but ran into the fact that non-UTF-8 locales have been deprecated
in Debian and are no longer easily configurable as of locales 2.31-14 from
last year, so I'm no longer sure of the right way to test this on a system
that wasn't already using an ISO 8859-1 locale.
--
Russ Allbery (rra at debian.org) <https://www.eyrie.org/~eagle/>
More information about the Perl-maintainers
mailing list