It is not a double-encoding bug. Your browser makes the (valid, in this case) assumption that the site expects input in Latin-1 (since that is what it declares its output to be in) and so your browser encodes things that don't fit into Latin-1 as HTML entities (making another assumption that is only partially valid here; that what you are sending will be interpretted as HTML). (Note that not all browsers make these assumptions and so not all browsers will behave this way; though other choices of browser behavior usually have worse outcomes.)

What you send for node content is interpretted as something close to HTML, but the content of CODE tags is just data; it is not interpretted at all beyond looking for the matching ending CODE (or C) tag. And PerlMonks content is Latin-1 so you can't put anything but Latin-1 into PerlMonks CODE tags.

We could try to convert the site to UTF-8, but that's a major project and given how long minor projects take I wouldn't start holding my breath on that. We could come up with a scheme for embedding non-Latin-1 characters in CODE tags (or something like CODE tags except for the Latin-1-ness). Most ideas I've come across for that are ugly in one way or another, usually looking less desirable than converting the site to UTF-8.

- tye        


In reply to Re: Unicode characters in <code> blocks (browser) by tye
in thread Unicode characters in <code> blocks by Joost

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.