in reply to Need advice on HTML entities
thats the old perl fallback. Or make your string utf8 before you pass it to decode_entities.HTML::Entities::decode_entities_old($string)
and since we like to print a utf8 char put STDOUT into utf8 mode too.my $string = "’"; chop ( $string .= chr(0x1234)); print "string: $string\n"; # &rsquo decode_entities($string);
UPDATE: or even better update HTML::Parser and it works out of the box. Tested with 3.43.# at the top of the program binmode STDOUT, ":utf8";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need advice on HTML entities
by wfsp (Abbot) on Feb 08, 2005 at 20:12 UTC |