Re: Disturbing IE 4.0pp2 behavior for lang="en"

On Fri, 22 Aug 1997, Mary Holstege wrote:

> 
> Benjamin Franz writes:
> > On Fri, 22 Aug 1997, E. Stephen Mack wrote:

> > > <meta http-equiv="Content-Type" value="text/html; charset='UTF-8'">
> >                                                             ^^^^^^^
> > This is the second time I have seen someone assert (either explicitly or
> > implicitly) that the charset should be contained in quotes. I looked
> > through the HTTP1.1 spec and could not find anything suggesting that this
> > was either necessary or even acceptable, and it appears to conflict with
> > actual usage for most documents I have seen. Where is this coming from?

> Pages 24 and 25 of the spec:
> 
>    HTTP uses Internet Media Types  in the Content-Type (section 14.18)
>    and Accept (section 14.1) header fields in order to provide open and
>    extensible data typing and type negotiation.
> 
>           media-type     = type "/" subtype *( ";" parameter )
>           type           = token
>           subtype        = token
> 
>    Parameters may follow the type/subtype in the form of attribute/value
>    pairs.
> 
>           parameter      = attribute "=" value
>           attribute      = token
>           value          = token | quoted-string
> 
> Looks to me like you should be able to quote it or not, as you please, because
> in this case the parameter value (UTF-8) is a valid token.
> 
> However, quoted string is defined to use the double quote (top of page 16).
> SGML and HTML allow you to use either paired double or single quotes.

Yes indeed. But in that case, it should be

<meta http-equiv="Content-Type" value='text/html; charset="UTF-8"'>

It may also be that either HTTP or MIME has some restrictions on
what goes for a "charset" parameter (e.g just a token and not a
quoted-string). But probably the main problems is whether browsers
grok the above string.

Regards,	Martin.

Received on Friday, 22 August 1997 11:21:15 UTC