My point was simply to suggest alternate fixes to the Perl Monks website.
Obviously, the best is to never mess with what's between code tags.
But, this would require PM to send proper, UTF8 encoded response content back to browsers.
There may be technical reason why the PM website can't do that. Possible work-arounds to that include (but not limited to):
- 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".
- 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.)
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.