develooper Front page | perl.perl5.porters | Postings from February 2012

Re: RFC & PROPOSAL: add perlunicook.pod to std docset

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
February 29, 2012 11:27
Subject:
Re: RFC & PROPOSAL: add perlunicook.pod to std docset
Message ID:
20378.1330543642@chthon
More bugs.

    darwin$ cd ~/blead 

    darwin$ blead -C0 utils/pod2html < ~/perlunicook.pod > /tmp/x.html
    Wide character in print at /Users/tchrist/blead/lib/Pod/Html.pm line 380.

where blead is an alias for '~/blead/perl -I ~/blead/lib'.

The offensive code is:

    $parser->parse_file($input);

    # Write output to file
    $Htmlfile = "-" unless $Htmlfile; # stdout
    my $fhout;
    if($Htmlfile and $Htmlfile ne '-') {
        open $fhout, ">", $Htmlfile
            or die "$0: cannot open $Htmlfile file for output: $!\n";
    } else {
        open $fhout, ">-";
    }
    print $fhout $output;
    close $fhout or die "Failed to close $Htmlfile: $!";

Because it is not specifying the encoding.

It gets even worse if you try to tell it to use an implicit one:

    darwin$ blead -CS  utils/pod2html < ~/perlunicook.pod > /tmp/x.html
    Cannot decode string with wide characters at /Users/tchrist/blead/lib/Encode.pm line 176.
    Exit 255

    darwin$ blead -CSD utils/pod2html < ~/perlunicook.pod > /tmp/x.html
    Cannot decode string with wide characters at /Users/tchrist/blead/lib/Encode.pm line 176.
    Exit 255

Yes, those are two different bugs.


Mind you, you get the same thing if you try running it against
pod/perlpodspec.pod or pod/perlcn.pod or whatnot.

That shows that it isn't just the roffy part of the toolchain
that's broken, nor is it only perlunicook.pod alone.

--tom

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About