Re: Bug#865713: Declaring a charset of UTF-8 for policy files

Simon McVittie <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <[email protected]>
On Sat, 24 Jun 2017 at 15:04:41 -0700, Russ Allbery wrote:
> Stéphane Blondon <[email protected]> writes:
> > pabs added such configuration few days ago for Apache configuration:
> > https://anonscm.debian.org/cgit/mirror/dsa-puppet.git/commit/?id=5bcf8431d6b375d211a29f9d2c338e4400332e1a
> 
> Paul, does this resolve your original issue?  I'm a bit worried that it
> might not because this was a little bit ago, and I think it should have
> already been in place when you were testing.

That configuration change was for ftp.debian.org, not for www. A
similar change to apache-www.debian.org.erb would probably do the right
thing.

http://ftp.debian.org/debian/doc/bug-log-access.txt does look correct
to me (with a Unicode copyright symbol near the end) in Firefox 52.2.0.
Compare:

$ curl --silent -o /dev/null --dump-header - \
  http://ftp.debian.org/debian/doc/bug-log-access.txt \
  | grep Content-Type
X-Content-Type-Options: nosniff
Content-Type: text/plain; charset=utf-8

$ curl --silent -o /dev/null --dump-header - \
  https://www.debian.org/doc/packaging-manuals/upgrading-checklist.txt \
  | grep -i Content-Type
X-Content-Type-Options: nosniff
Content-Type: text/plain

For what it's worth, I agree that declaring the correct charset in HTTP
metadata is a better solution than prepending U+FEFF ZERO WIDTH NO-BREAK SPACE
(aka the "byte-order mark") in the file content.

Regards,
    S
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.