BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Please help with a PHP and/or Apache2 problem
- Subject: [Discuss] Please help with a PHP and/or Apache2 problem
- From: alex at pennace.org (Alex Pennace)
- Date: Sun, 7 Feb 2021 13:13:43 -0500
- In-reply-to: <06ab24f0-ab46-350f-36ae-365a1a7b0f94@gmail.com>
- References: <06ab24f0-ab46-350f-36ae-365a1a7b0f94@gmail.com>
On Sun, Feb 07, 2021 at 12:47:11PM -0500, Bill Horne wrote: > Thanks for reading this. I appreciate your time. > > I'm the moderator of The Telecom Digest <http://telecom-digest.org/>, and I > publish an archive of the Digest's back issues. > > I've noticed a problem with the archive: the Digest uses the ISO-8859-1 > character set, but somehow the archives aren't using it, at least in my > Chrome browser Version 88.0.4324.150 under W10. > > Please compare the result you get from both of these URL's ... > > http://telecom-digest.org/archives/back.issues/recent.single.issues/a2.php > <http://telecom-digest.org/archives/back.issues/recent.single.issues/a2.php> > > http://telecom-digest.org/archives/back.issues/recent.single.issues/V40-38 > <http://telecom-digest.org/archives/back.issues/recent.single.issues/V40-38> > > The first URL shows today's Digest, with some question marks in place of > accented characters. The second appears to be normal. > > The "a2.php" file is a stripped-down version of our usual archive retrieval > code. It is shown below. > > > <?php > > include "[redacted]/archives/back.issues/recent.single.issues/V40-38"; > > ?> > > The question is "why?"? All suggestions welcome. The telecom-digest.org web server sends back the following header for the a2.php URL: alex at buick:~$ GET -ed http://telecom-digest.org/archives/back.issues/recent.single.issues/a2.php 200 OK Connection: close Date: Sun, 07 Feb 2021 18:10:39 GMT Server: Apache/2.4.18 (Ubuntu) Vary: Accept-Encoding Content-Length: 5705 Content-Type: text/html; charset=UTF-8 Client-Date: Sun, 07 Feb 2021 18:10:39 GMT Client-Peer: 128.31.0.70:80 Client-Response-Num: 1 Title: The Telecom Digest alex at buick:~$ The "charset=UTF-8" part is the clue. It tells web browsers "this page is in UTF-8." The problem is the content isn't encoded in UTF-8, it is encoded in ISO-8859-1 (as you note). Completely untested, but try this: <?php header('Content-Type: text/html; charset=ISO-8859-1'); include "[redacted]/archives/back.issues/recent.single.issues/V40-38"; ?> -- Alex Pennace, alex at pennace.org
- Follow-Ups:
- [Discuss] Please help with a PHP and/or Apache2 problem
- From: malassimilation at gmail.com (Bill Horne)
- [Discuss] Please help with a PHP and/or Apache2 problem
- References:
- [Discuss] Please help with a PHP and/or Apache2 problem
- From: malassimilation at gmail.com (Bill Horne)
- [Discuss] Please help with a PHP and/or Apache2 problem
- Prev by Date: [Discuss] Please help with a PHP and/or Apache2 problem
- Next by Date: [Discuss] Please help with a PHP and/or Apache2 problem
- Previous by thread: [Discuss] Please help with a PHP and/or Apache2 problem
- Next by thread: [Discuss] Please help with a PHP and/or Apache2 problem
- Index(es):