Re: encoding: not always required

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