Subject: | More encoding bizarrities |
use HTML::TreeBuilder;
use Data::Dumper;
my $TB = HTML::TreeBuilder->new();
my $html = $TB->parse("This ∼ is a twiddle")->eof->elementify();
for my $pack qw(HTML::Parser HTML::TreeBuilder HTML::Element) {
print qq{$pack: ${"$pack\::VERSION"}\n};
}
print $html->as_HTML("\x0");
print $html->as_HTML("");
The output is:
HTML::Parser: 3.51
HTML::TreeBuilder: 3.13
HTML::Element: 3.16
Wide character in print at /tmp/tb2 line 10.
<html><head></head><body>This \342? is a twiddle</body></html>
<html><head></head><body>This ∼ is a twiddle</body></html>
This can't be right.