You aren't decoding your source string first.
use strict; use warnings; use HTML::Entities; use Encode; my $TestStr = 'ï'; print encode_entities($TestStr) . "\n"; print encode_entities(decode ('utf-8', $TestStr)) . "\n";
Have a read of perlunitut if you haven't already. It'll explain the basics.
In reply to Re: Encode string to HTML
by hippo
in thread Encode string to HTML
by gepebril69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |