in reply to Re: HTML::Treebuilder Special characters
in thread HTML::Treebuilder Special characters

I get the proper content from the page with the same look and feel
plain text : ü
but when the HTML content is parsed using HTML::TreeBuilder the
plain text is converted into HTML codes.

Thanks
Jey
  • Comment on Re^2: HTML::Treebuilder Special characters

Replies are listed 'Best First'.
Re^3: HTML::Treebuilder Special characters
by jai_dgl (Beadle) on Sep 17, 2009 at 09:20 UTC
    This function helped me to solve the issue
    sub encode_entities_decimal { my $text = shift; $text =~ s{([^\0-\x7f])}{sprintf("&#%d;",ord($1))}ge; $text; }