slugger415 has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, I've looked at this topic . I'm trying to convert smart quotes and other "dumb" characters to standard ASCII characters; what I've found, including this topic here, haven't worked.
demoroniser seems to recognize the single smart quote as three separate characters, and makes the 3rd one a <SUP> element.
If you look at this page you'll see the problematic single quote in the What's New string. I can't seem to search on it with a regex or \x92 or one of those... I would like to find and replace all such miscreant characters. Running Tidy converts it to three character entities... I haven't seen a bit of code that works.
Any suggestions would be most appreciated, as always.
UPDATE: also tried HTML::Entities:
encode_entities($b);
result:
What’s
and ord() might work if I could properly search on it...
Scott
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: converting smart quotes
by tobyink (Canon) on Mar 19, 2012 at 22:26 UTC | |
by ikegami (Patriarch) on Mar 19, 2012 at 23:05 UTC | |
by tobyink (Canon) on Mar 20, 2012 at 00:51 UTC | |
by ikegami (Patriarch) on Mar 20, 2012 at 03:08 UTC | |
|
Re: converting smart quotes
by ww (Archbishop) on Mar 19, 2012 at 23:11 UTC | |
by ikegami (Patriarch) on Mar 20, 2012 at 03:23 UTC | |
by slugger415 (Monk) on Mar 20, 2012 at 04:18 UTC | |
by tangent (Parson) on Mar 20, 2012 at 12:05 UTC | |
by ww (Archbishop) on Mar 20, 2012 at 12:14 UTC | |
by tobyink (Canon) on Mar 20, 2012 at 13:14 UTC | |
by slugger415 (Monk) on Mar 20, 2012 at 14:49 UTC | |
by slugger415 (Monk) on Mar 20, 2012 at 14:30 UTC | |
|