W3C home > Mailing lists > Public > www-international@w3.org > January to March 2014

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 22 Jan 2014 14:42:42 -0800
Message-ID: <CAAWBYDA3uJidC8iFZhUEY4Qn6wY6RuOOL1DHjOR=cF7Kbgb_JA@mail.gmail.com>
To: "Phillips, Addison" <addison@lab126.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, Richard Ishida <ishida@w3.org>, Zack Weinberg <zackw@panix.com>, www-style list <www-style@w3.org>, www International <www-international@w3.org>
On Wed, Jan 22, 2014 at 12:25 PM, Phillips, Addison <addison@lab126.com> wrote:
> The issue here is that CSS's normal syntax allows different whitespace and quote formation within the actual CSS of the file. But the character encoding declaration requires SPECIFIC space and quoting. That variation is not friendly to users of CSS, who expect that @charset is just a normal syntactic element of CSS, even if, in actuality, it is not. Since the byte munging involved is not remarkably difficult to describe or implement and since it will improve the likelihood that people "get it right" (let alone not breaking existing stylesheets that somehow get it wrong), why not specify @charset consistently with the rest of CSS? I'm fine with saying it has to come first, etc. for the reasons you cite.

The correct answer is just "don't use @charset at all".  Use UTF-8,
declare <meta charset=utf-8> in your HTML file, and never worry about
charsets ever again.

Doing any work at all to make @charset "more convenient" is a waste.

Received on Wednesday, 22 January 2014 22:43:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:04 UTC