W3C home > Mailing lists > Public > www-validator-css@w3.org > September 2004

HTTP header. Invalidity of setting charset in html.

From: Michael Talbot-Wilson <mtw@view.net.au>
Date: Wed, 15 Sep 2004 18:02:13 +0930 (CST)
To: WWW Validator List <www-validator-css@w3.org>
Message-ID: <Pine.LNX.4.53.0409151610210.5599@chameleon.view.net.au>

Can anyone explain the rationale for the charset specified by the http
header over-riding that in the document during validation (and
browsing).  It would seem reasonable for the document to override the
server setting.  Otherwise there seems no point, it is logically
invalid, to specify the charset in the xml declaration and html
header.  It seems idiotic for the server to defeat the document

My document starts like this:

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
      <meta http-equiv="Content-Type"
            content="text/html; charset=utf-8" />

The message I get from check-referer is:

"Character encoding mismatch!  The character coding specified in the
HTTP header (iso-8859-1) is different from the value in the XML
declaration (utf-8).  I will use the value in the HTTP header

I can't see any point in this.  It means that setting a charset in the
xml declaration or the html header is necessarily a redundant and
strictly invalid operation.

If I use the override on validator it gives a tentative validation and
screams about fixing my crappy utf-8 doc by turning it into gemuine

And, incidentally, I've been unable to discover in the source, the
config file or the docs how to set the charset in the header.  I have

     AddCharset utf-8 .en .html

for the virtual host and see no complaint in the log file.  (Using
Apache 1.3.14.)

Hope someone can help.  Thanks.

Received on Wednesday, 15 September 2004 09:14:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:40 UTC