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@[193.157.66.23]>

-----BEGIN PGP SIGNED MESSAGE-----
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
information.

- -- 
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

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.0.2

iQA/AwUBPwXbdqPyPrIkdfXsEQLpdQCeI+kDKvLZEZgM0883SXprowVxSnAAn0H8
4JXyYrY7+kCwwIBp+3GrMgJU
=+Ynb
-----END PGP SIGNATURE-----
Received on Friday, 4 July 2003 15:54:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:09 GMT