I ran into a UTF-8 handling issue in Pod::Elemental::Transformer::VimHTML when highlighted input arrives as already-decoded Perl text.
In the failing case, content like guillemets in #!vim perl blocks can render as mojibake, for example «...» instead of «...».
The downstream fix that worked for me was:
- normalize likely double-encoded-looking decoded input before passing it to
Text::VimColor
- avoid pre-encoding already-decoded Perl strings to octets
- only decode HTML output if it is not already flagged as UTF-8
- add an explicit
use Carp qw(confess); import while touching the module
Downstream context:
If helpful, I can also put together a cleaner upstream-oriented PR from a fresh branch/repo shape. I wanted to at least report the bug and the working fix path first.
I ran into a UTF-8 handling issue in
Pod::Elemental::Transformer::VimHTMLwhen highlighted input arrives as already-decoded Perl text.In the failing case, content like guillemets in
#!vim perlblocks can render as mojibake, for example«...»instead of«...».The downstream fix that worked for me was:
Text::VimColoruse Carp qw(confess);import while touching the moduleDownstream context:
If helpful, I can also put together a cleaner upstream-oriented PR from a fresh branch/repo shape. I wanted to at least report the bug and the working fix path first.