From: Geoff Richards Date: Wed, 18 Jul 2007 05:26:15 GMT Subject: Re: Character set for the HTML documentation Message-ID: <20070718052615.GA4441@ungwe.org> In-Reply-To: <469D516B.6030806@zytor.com> On Tue, Jul 17, 2007 at 04:31:55PM -0700, H. Peter Anvin wrote: > I just got the following email: > > > The Git documentation at > > 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 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...? Unfortunately, it's not a bug. The correct thing for a browser to do is give the 'Content-Type' HTTP header priority over the 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 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