in reply to XML::Twig, HTML::Table, and wide characters

An extra tidbit: HTML::Table is a red herring.

my $new_elt = XML::Twig::Elt->new('div'); $new_elt->set_inner_html(''); $new_elt->paste(before => $_);

is enough to trigger the problem, but the following isn't

my $new_elt = XML::Twig::Elt->new('div'); #$new_elt->set_inner_html(''); $new_elt->paste(before => $_);