<?xml version="1.0" encoding="windows-1252"?>
<node id="662953" title="Re: &quot;Unrecognized character&quot; stops perl cold" created="2008-01-17 15:12:05" updated="2008-01-17 10:12:05">
<type id="11">
note</type>
<author id="87699">
naChoZ</author>
<data>
<field name="doctext">
&lt;p&gt;
I find this very annoying also.  It's because the perldoc renderer is doing silly things like replacing regular '-' dash/hyphen characters with chr(226) (instead of the normal chr(45) character) and replacing single ticks with the "prettier" version of the single quote.  I have not been able to figure out how to get this to display properly without switching completely to raw or text mode.
&lt;/p&gt;&lt;p&gt;
My solution was to bind a key in vim to run this silly little script.  So whenever I paste some code from some perldoc I'm viewing, I run this over the code.
&lt;/p&gt;&lt;p&gt;
&lt;code&gt;
#!/usr/bin/perl -n

s/&amp;#8208;/-/g;
s/&amp;#8722;/-/g;
s/’/'/g;
print;
&lt;/code&gt;
&lt;/p&gt;&lt;p&gt;
I notice it renders oddly in the perlmonks node, but you get the idea.  I literally just copy and pasted the offending symbol into this script.
&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-87699"&gt;
&lt;p&gt;
-- &lt;br /&gt;
naChoZ
&lt;/p&gt;
&lt;p&gt;Therapy is expensive. Popping bubble wrap is cheap. You choose.
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
662942</field>
<field name="parent_node">
662942</field>
</data>
</node>
