in reply to Encode string to HTML
Also, note that your code needs to know its own encoding.
use strict; use HTML::Entities; { my $TestStr = 'ï'; print encode_entities($TestStr), $/; } { use utf8; my $TestStr = 'ï'; print encode_entities($TestStr), $/; } __END__ ï ï
|
|---|