Re: Ignoring meta http-equiv for application/xhtml+xml

On Sun, Apr 6, 2008 at 10:13 PM, Karl Dubost <karl@w3.org> wrote:
>
>  Le 7 avr. 2008 à 10:15, Nikita The Spider The Spider a écrit :
>
>
> > I'm trying to understand the validator's logic for ignoring the
> > http-equiv charset declaration in documents delivered as
> > application/xhtml+xml.
> >
> > I get an encoding of UTF-8 when validating this file:
> > http://NikitaTheSpider.com/boneyard/temp/meta-test-xhtml-as-xml.xhtml
> >
>
>  Hmm interesting. The file is not XML conformant. UTF-8 or UTF-16 are
> assumed for XML files, if you use a different encoding, you have to use an
> XML declaration such as:
>         <?xml version="1.0" encoding="ISO-8859-5"?>
>  in this case.

Ooops, right you are.


>  In your file, this doesn't seem to be correct:
>     <meta http-equiv="Content-Type" content="charset=ISO-8859-5" />
>
>  The syntax for HTTP headers is
>     Content-Type   = "Content-Type" ":" media-type
>
>  Section 14.17
>  http://www.ietf.org/rfc/rfc2616.txt
>
>  It should be
>    <meta http-equiv="Content-Type"
>          content="application/xhtml+xml;charset=ISO-8859-5" />

Right again, as Olivier pointed out as well. Thank you both.

When I correct my faulty META tags syntax I get the same results.

Looking over my notes & code, I realize that I'm doing things the same
way in Nikita.

Golly, it sure would be helpful if someone was to write an article
about divining encodings on the Web to make all of this stuff clear
and easy to remember. Oh, that's right, someone already has...

Thanks for the sanity check.


-- 
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more

Received on Monday, 7 April 2008 04:13:12 UTC