sub convert_to_html_entities { my $str= shift; utf8::decode($str); $str =~ s/[\x{201A}-\x{2122}]/ ''.ord($&).';' /ger; } #### sub convert_nonascii_to_html_entities { my $str= shift; utf8::decode($str); $str =~ s/[^\x20-\x7E]/ ''.ord($&).';' /ger; }
## sub convert_nonascii_to_html_entities { my $str= shift; utf8::decode($str); $str =~ s/[^\x20-\x7E]/ ''.ord($&).';' /ger; }