Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-28 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found