note
RonW
<p>My point was simply to suggest alternate fixes to the Perl Monks website.</p>
<p>Obviously, the best is to never mess with what's between code tags.</p>
<p>But, this would require PM to send proper, UTF8 encoded response content back to browsers.</p>
<p>There may be technical reason why the PM website can't do that. Possible work-arounds to that include (but not limited to):</p>
<ul>
<li>Save the content between code tags as-is, only applying entity encoding when generating HTML. Then download links would provide the code content as-is using "Content-type: application/octet".</li>
<li>For content between code tags, use "\x" encoding instead of entity encoding. Since (at least for now), non-7-bit-characters are most likely to occur in quoted strings, Perl itself would be able to decode the characters that appear in quoted strings. (Of course, if they are in the actual source code, either entity or \x encoding will make a mess.)</li>
</ul>
<p>Again, these are just alternatives to the proper solution. It would be great if PM is able to properly support UFT8 content. We may have to live with a work around.</p>
1171812
1171919