- or download this
use HTML::Entities;
...
$encoded = encode_entities($input, "\xA0-\x{FFFD}");
print "$encoded\n";
- or download this
abc < ä > <p> Ö & ü xyz
abc < ä > <p> Ö & ü xyz 啕 袈
- or download this
s/([\xA0-\x{FFFD}])/$char2entity{$1} || num_entity($1)/ge;
- or download this
$encoded = encode_entities($input, "^\x20-\x7E"); # do not encode pri
+ntable ASCII chars