lynx dump double encoding for utf8
by usr345 from LinuxQuestions.org on (#5P3XY)
I have a utf8 encoded html file with Russian text:
Code: , ...<span id="d6a0f08e75753cc2cursor-target"></span><br /><br />When I try to render it with the following command:
Code:lynx -dump --display_charset=utf-8 ~/mess.htmlI get this:
Code: D DD DDNND DDND3/4DN, D ND3/4DDDDDDN...Ok, this looked familiar to me: double encoding of utf8. I created the following Perl script:
Code:#!/usr/bin/perl
use utf8;
use strict;
use warnings;
use Encode qw(encode);
my $text = " , ...";
print encode("utf8", encode("utf8", $text)) . "\n";And voila, we got the same result: "D DD DDNND DDND3/4DN, D ND3/4DDDDDDN...".
How to fix this in lynx?
Code: , ...<span id="d6a0f08e75753cc2cursor-target"></span><br /><br />When I try to render it with the following command:
Code:lynx -dump --display_charset=utf-8 ~/mess.htmlI get this:
Code: D DD DDNND DDND3/4DN, D ND3/4DDDDDDN...Ok, this looked familiar to me: double encoding of utf8. I created the following Perl script:
Code:#!/usr/bin/perl
use utf8;
use strict;
use warnings;
use Encode qw(encode);
my $text = " , ...";
print encode("utf8", encode("utf8", $text)) . "\n";And voila, we got the same result: "D DD DDNND DDND3/4DN, D ND3/4DDDDDDN...".
How to fix this in lynx?