note
ikegami
<p>It simply decodes the entities. It doesn't then encode the character using UTF-8.
<p>If you want all non-ASCII characters encoded, you can use:
<c>
use HTML::Entities qw( encode_entities_numeric );
sub handle_char {
my $self = shift;
my $x = shift;
print encode_entities_numeric($x);
}
</c>
<p>There's also a handler you can use instead of Char that receives the entities still encoded, but then you're not guaranteed to have all non-ASCII characters encoded.
817319
817319