in reply to Stripping bad characters in rss
$text =~ s/Æ//gi; $text =~ s/ì//gi;
This hints to me that you might be having encoding issues rather than people actually entering these characters. Since you haven't shown any of your code of how you actually get $text, I can't make any suggestions as to how you can fix it, but you should be fixing this at the source.
$text =~ s/&//gi; ... $text =~ s/\x95/\<li\>/gi;
Are you processing the raw RSS (XML) directly? I already said it two weeks ago: Do not use regular expressions to process XML/HTML. In this case the correct solution would be to either use an XML module and only apply the regexes to the content of text nodes, or to process the text before putting it in the XML.
$text =~ s/’/'/gi;
I might suggest Text::Unidecode for these kind of replacements.
$text =~ s/\x9s/-/gi;
These are the bullets when copied out of the text, but using this code doesn't work:
Did you save your Perl file as UTF-8 and declare use utf8;? SSCCE.
|
|---|