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

PerlMonks main page: garbled character encoding

by kikuchiyo (Hermit)
on Mar 22, 2021 at 12:24 UTC ( [id://11130114]=monkdiscuss: print w/replies, xml ) Need Help??

When I load the main page, there is a character encoding issue: Image

Interestingly, it appears normal when I open the link or when I log in.

Firefox also displays this warning on the development tools panel: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol."

  • Comment on PerlMonks main page: garbled character encoding

Replies are listed 'Best First'.
Re: PerlMonks main page: garbled character encoding
by LanX (Saint) on Mar 22, 2021 at 13:05 UTC
    I can confirm.

    -> Monastery Gates (This link at .net will log most of you out)

    We have occasional Unicode problems in nodes, which can disappear after reload. (Like when using characters like ° or ’ )

    But this one seems consistent.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Interesting. When viewing the page not logged in, Firefox reports the following info:

      • Type: text/html
      • Render Mode: Quirks mode
      • Text Encoding: GBK
      When logged in, Firefox reports the following info:
      • Type: text/html
      • Render Mode: Quirks mode
      • Text Encoding: windows-1252

      Why would the encoding be different? I think the browser is inferring the encoding from the page's content... and the content is different if you're logged in.

        Firefox shows me the HTTP header Content-Type:text/html when I'm not logged in.

        The ; charset=Windows-1252 part is missing.

        HTTP/1.1 200 OK Date: Mon, 22 Mar 2021 14:27:09 GMT Server: Apache Last-Modified: Mon, 22 Mar 2021 14:27:05 GMT ETag: "efc2-5be20dc244d70" Accept-Ranges: bytes Content-Length: 61378 Keep-Alive: timeout=5, max=98 Connection: Keep-Alive Content-Type: text/html

        A check in Chrome shows the same:

        HTTP/1.1 200 OK Date: Mon, 22 Mar 2021 14:19:57 GMT Server: Apache Last-Modified: Mon, 22 Mar 2021 14:18:09 GMT ETag: "effb-5be20bc33b176" Accept-Ranges: bytes Content-Length: 61435 Content-Type: text/html

        Logged in (FF)

        HTTP/2 200 OK date: Mon, 22 Mar 2021 14:24:41 GMT server: Apache content-type: text/html; charset=Windows-1252 X-Firefox-Spdy: h2

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        update

        That's RAT no log-in ... charset=Windows-1252 is back

        HTTP/1.1 200 OK Date: Mon, 22 Mar 2021 15:15:43 GMT Server: Apache Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=Windows-1252
        In this day and age, one wonders why we're not using:
        <!DOCTYPE html> <head> <meta charset="utf-8"> <!-- ... -->

        --f

      I can confirm.

      I can refute: it renders fine here in Pale Moon 29.1.0. Perhaps it is a browser-specific quirk?


      🦛

        I think your browser does a better guessing when charset is missing in the headers.

        My guess:

        There are some Apache settings to serve the "Monastery Gates" better to bots which are not up to date.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        PS: Pale Moon looks interesting. Would be nice to know if it still supports the mozrepl add-on. This would also give WWW::Mechanize::Firefox a lifeline.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://11130114]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found