tag 492037 patch
forwarded 492037 http://rt.cpan.org/Ticket/Display.html?id=39000
thanks

On Sun, Aug 17, 2008 at 09:15:15AM +0300, Niko Tyni wrote:
> On Wed, Jul 23, 2008 at 04:10:58PM +0400, Dmitry E. Oboukhov wrote:
> > Package: perl
> > Version: 5.10.0-10
> > Tags: l10n
> > Severity: important
> > 
> > In attache You can found pod with russian symbols in utf-8 charset.
> > This file is showed incorrectly:
> 
> > XXXXXXXXX1
> 
> perldoc actually runs pod2man in the background, so this is very related
> to #480997. I'm looking for a way to get this fixed for Lenny, either
> with the separate podlators-perl package (currently only in sid)
> or by patching Pod::Man.
> 
> A workaround for now is the perldoc '-t' option.

It's looking like we're going to have a separate podlators-perl package
for Lenny, so we need to detect if pod2man actually supports '--utf8̈́'.

I'm considering the attached patch, which I just sent upstream for
comments as [rt.cpan.org #39000].
-- 
Niko Tyni   [EMAIL PROTECTED]
Make /usr/bin/perldoc invoke pod2man with the "--utf8" option if it detects a new enough Pod::Man version. (Closes: #492037)

diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm
index 4319122..f697e5c 100644
--- a/lib/Pod/Perldoc/ToMan.pm
+++ b/lib/Pod/Perldoc/ToMan.pm
@@ -60,6 +60,10 @@ sub parse_from_file {
       unless -e $pod2man;
   }
 
+  eval { require Pod::Man };
+  $switches .= " --utf8"
+    if (!$@ && $Pod::Man::VERSION >= 2.18);
+
   my $command = "$pod2man $switches --lax $file | $render -man";
          # no temp file, just a pipe!
 

Reply via email to