Re: [css-syntax] ISSUE-329: @charset has no effect on stylesheet??

Edward O'Connor, Fri, 31 Jan 2014 16:03:40 -0800:
> Hi Leif,
> 
> You wrote:
> 
>> Tab Atkins Jr., Fri, 24 Jan 2014 08:44:34 -0800:
>>> Every HTML document should include a <meta charset=utf-8> in its head.
>>>  It's as much a part of a valid document as the doctype, frankly -
>>> lacking it effectively puts you in "quirky encoding" mode.
>> 
>> This need to use meta is not reflected in the HTML (5) spec
> 
> Yes it is. Emphasis mine:

Tab used the word ”should”. Which I interpreted as “SHOULD“. 

>> If an HTML document does not start with a BOM, and its encoding is not
>> explicitly given by Content-Type metadata, and the document is not an
>> iframe srcdoc document, then the character encoding used must be an
>> ASCII-compatible character encoding, and *the encoding must be
>> specified using a meta element* with a charset attribute or a meta
>> element with an http-equiv attribute in the Encoding declaration
>> state.
> 
> See
> 
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset

> http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#charset


My response reflected the fact that some are of the opinion that every 
document should have a meta element encoding declaration even if the 
HTTP server or a BOM  declares it for us - and that Tab sounded like he 
said something like that. However, all the spec says, is that the 
encoding has to be declared some way or another. There is no "best 
practice" statement that one should always include the meta element - 
in the spec. But we could of course add it.
-- 
leif halvard silli

Received on Saturday, 1 February 2014 10:00:04 UTC