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

On Fri, Jan 24, 2014 at 7:12 AM, Zack Weinberg <zackw@panix.com> wrote:
> ... What I wrote perhaps suffers from me not actually believing Tab's
> argument that new stylesheets can just use UTF-8 and not bother with
> @charset.  Assuming for this discussion that the "can just use UTF-8"
> part is not a problem, leaving out the @charset only works if every
> referring document also uses UTF-8, or if the server is configured to
> send Content-Type directives with an encoding annotation.  It has been
> my experience that neither of these can actually be relied on in
> practice (you would not *believe* how many web developers have told me
> that HTTP headers are completely out of their control!)  So what I
> actually think is that encoding should always be annotated in-band, even
> if it is "the" encoding.

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.

As long as that happens, there's no reason to declare in-band charsets
on any resource.  They'll either default to utf-8 or pull the encoding
from the HTML page.

~TJ

Received on Friday, 24 January 2014 16:45:30 UTC