The code in that node appears to contain non-blocking space characters (160), probably so that HTML won't ignore the extra white space (similar to a trick I used myself in rendering <code> sections at PM, however I use &nbsp; instead of a single-byte character with a value of 160).

I'm a little surprised that either your browser is that broken or that your font on NT is missing this character. If I had to guess at why you see this problem when I don't, my first guess would be that you have installed some aditional fonts and so your browser is selecting a different font than mine is. The PM CSS provides a fairly long list of fonts to choose from (trying to get reasonable appearance on most common platforms), so installing a new font can easily make the site suddenly look much different.

I don't know if you can get your browser to tell you what font it is rendering the code in, but that would be helpful information (you could verify that the font is missing a rendering for character 160).

My next guess would be that my browser (IE6) is changing 160 into 32 after it takes into account the wrapping implications. But I doubt that and also see evidence that at least some of my fonts do have a valid entry for character 160.

After that, I'm forced to start thinking that your browser is badly broken and either is ignoring the charset=ISO-8859-1 in the Content-type: header that PM provides or trying to be tricky in how it displays character 160. But that all seems pretty unlikely as well. Perhaps you have told your browser to "override" the character set?

BTW, I wouldn't use "unicode" in regard to this situation. The character set PM emits is Latin-1 and we aren't using any Unicode encoding, simply 8-bit characters.

                - tye

In reply to Re: Unicode in <code> sections. (160=&nbsp;) by tye
in thread Unicode in <code> sections. by BrowserUk

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.