Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: PerlMonks main page: garbled character encoding

by LanX (Saint)
on Mar 22, 2021 at 13:05 UTC ( [id://11130118]=note: print w/replies, xml ) Need Help??


in reply to PerlMonks main page: garbled character encoding

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

  • Comment on Re: PerlMonks main page: garbled character encoding

Replies are listed 'Best First'.
Re^2: PerlMonks main page: garbled character encoding
by jdporter (Paladin) on Mar 22, 2021 at 13:50 UTC

    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

        OK, that would suggest that it's the server, rather than the browser, making the (weird) charset determination. In any case, I'm 99.9% sure it's not the PM Engine doing it.

      In this day and age, one wonders why we're not using:
      <!DOCTYPE html> <head> <meta charset="utf-8"> <!-- ... -->

      --f

Re^2: PerlMonks main page: garbled character encoding
by hippo (Bishop) on Mar 22, 2021 at 13:53 UTC
    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.

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

        In all honesty I suspect it is just luck. Under Tools->Preferences->Content->Fonts & Colours->Advanced->Fallback Character Encoding I have "Default for Current Locale" set. The $LANG is en_GB.UTF-8 but viewing the not-logged-in Monastery Gates the content encoding under View->Character Encoding is "Western", ie. Latin-1. But under "View Page Info" it is "windows-1252". Make of that what you will.

        Pale Moon looks interesting.

        It is indeed. I've been using it for the past 11 months and it is, in general, really very good - like how Firefox used to be before they canned all the useful stuff and broke most of the add-ons. I've not knowingly used mozrepl so can't comment on that.


        🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found