Character set for the HTML documentation
I just got the following email:
Quoted 11 lines
The Git documentation at
<http://www.kernel.org/pub/software/scm/git/docs/user-manual.html> is encoded in ISO 8859-1, but it is being served with a content-type header of "text/plain; charset=UTF-8".The content-type header overrides the value declared in the <meta> tag of the HTML document, so this causes browsers to render the documentation incorrectly.
Apologies if this is a well known issue and you get a lot of mail like this BTW, just don't LART me too hard. ;)
The fact that browsers behave this way is of course a bug, but it's a common one. Can we switch the documentation over to UTF-8, this is 2007 after all...?
-hpa
Quoted 11 lines · H. Peter Anvin
I just got the following email:
Quoted 9 lines
The Git documentation at
<http://www.kernel.org/pub/software/scm/git/docs/user-manual.html> is encoded in ISO 8859-1, but it is being served with a content-type header of "text/plain; charset=UTF-8".The content-type header overrides the value declared in the <meta> tag of the HTML document, so this causes browsers to render the documentation incorrectly.
Quoted 6 lines
Quoted 2 lines
Apologies if this is a well known issue and you get a lot of mail like this BTW, just don't LART me too hard. ;)
The fact that browsers behave this way is of course a bug, but it's a common one. Can we switch the documentation over to UTF-8, this is 2007 after all...?
Unfortunately, it's not a bug. The correct thing for a browser to do is give the 'Content-Type' HTTP header priority over the <meta> element. It's defined in an RFC somewhere.
Best thing to do is tell Apache (or whatever) not to send the HTTP header ("AddDefaultCharset off"), and make sure all the HTML has a correct <meta> element specifying the encoding.
And yes, putting everything in UTF-8 unless you've got a specific reason not to is probably going to make life simpler as well.
HTH,
geoff
Quoted 2 lines · H. Peter Anvin
Can we switch the documentation over to UTF-8, this is 2007 after all...?
By all means, yes.
I do not think we particularly wanted to use 8859-1, but nothing in Documentation/ tells the asciidoc toolchain that the document should come out in UTF-8 either.