D
Dan Jacobson
Below, I found if I place binmode() earlier, the first UTF-8 <<EOF
becomes gibberish on output. Removing it causes wide character
warnings at $p->header. I suppose it will just have to stay in between
the two. Must be my junior programmer status to blame.
require HTML::HeadParser; print <<EOF;
[some raw utf-8 characters here]
EOF
binmode(STDOUT,":utf8"); open(my $fh,"<:utf8",$_);
$p=HTML::HeadParser->new; $p->parse_file($fh); print $p->header('Title');
becomes gibberish on output. Removing it causes wide character
warnings at $p->header. I suppose it will just have to stay in between
the two. Must be my junior programmer status to blame.
require HTML::HeadParser; print <<EOF;
[some raw utf-8 characters here]
EOF
binmode(STDOUT,":utf8"); open(my $fh,"<:utf8",$_);
$p=HTML::HeadParser->new; $p->parse_file($fh); print $p->header('Title');