W3C home > Mailing lists > Public > www-validator@w3.org > July 2003

Re: encoding: not always required

From: Terje Bless <link@pobox.com>
Date: Fri, 4 Jul 2003 21:54:31 +0200
To: W3C Validator <www-validator@w3.org>
cc: Neil Zanella <nzanella@cs.mun.ca>
Message-ID: <r02000000-1026-54144114AE5911D794590030657B83E8@[]>

Hash: SHA1

Neil Zanella <nzanella@cs.mun.ca> wrote:

>If you name it hello.xml and run it through the validator than
>everything works fine. However, if I name it hello.html then the
>validator complains.

The determination of character encoding depends on the Content-Type the
document is served as, and this in turn is often determined based on what
filename extension is used. In particular, for files served with an XML
Content-Type the XML defaulting rules take effect, whereas for text/html they
do _not_.

I strongly recommend that you configure your server to send out the correct
character encoding in the Content-Type header field. It is the most certain
way of ensuring that there is no confusion as to what the character encoding
of the document is.

See, e.g., <http://www.w3.org/International/O-HTTP-charset> for further

- -- 
Of course we are the good guys! We define what is good and evil. All other
definitions are wrong, and possibly the product of a deranged imagination.
                                                         -- Stephen Harris

Version: PGP SDK 3.0.2

Received on Friday, 4 July 2003 15:54:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:37 UTC