diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-11 00:46:47 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-11 00:48:10 +0100 |
commit | c8cf970e335f870c5f14f2646b3fb6e70a85344f (patch) | |
tree | 2261f6c490b470ef4983fb271beff39c78766f19 | |
parent | 5216f50620508ebd16fe8230eda7060f0e4e4427 (diff) | |
download | mht-c8cf970e335f870c5f14f2646b3fb6e70a85344f.tar.gz |
mht: Decode UTF-8 input
ash: par: not found
But this seems to be needed in order for UTF-8 input to work with
HTML::Entities.
-rwxr-xr-x | mht | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3,6 +3,7 @@ use v5.12; use warnings; +use Encode qw/decode_utf8/; use HTML::Entities qw/encode_entities/; use Text::ParseWords qw/quotewords/; @@ -144,7 +145,7 @@ while (<>) { $empty .= "\n"; } else { print $empty; $empty = ''; - print encode_entities($_) . "\n"; + print encode_entities(decode_utf8($_)) . "\n"; } } |