in reply to Re^2: PerlMonks main page: garbled character encoding
in thread PerlMonks main page: garbled character encoding

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

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

    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.

      I can confirm with curl that I receive different headers from the server, depending on whether or not I send my login cookie. (I obfuscated the value of my cookie for pasting.) This agrees with what I see in Chrome's developer tools network inspection, which lists headers without a charset in anonymous/incognito, vs headers with charset in my tab where I'm logged in.

      C:\Users\Peter>curl --head https://perlmonks.org HTTP/1.1 200 OK Date: Mon, 22 Mar 2021 22:14:50 GMT Server: Apache Upgrade: h2,h2c Connection: Upgrade Last-Modified: Mon, 22 Mar 2021 22:12:10 GMT ETag: "ee70-5be275b693fc1" Accept-Ranges: bytes Content-Length: 61040 Content-Type: text/html C:\Users\Peter>curl --cookie "userpass=XXXXXXXXXXXXXXXXXXXXXXXXXXXX" - +-head https://perlmonks.org HTTP/1.1 200 OK Date: Mon, 22 Mar 2021 22:14:26 GMT Server: Apache Upgrade: h2,h2c Connection: Upgrade Content-Type: text/html; charset=Windows-1252

      -- edit: sorry, first time I posted, I misread the statement, so I deleted one sentence where I commented based on my misreading.