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

Re: [css-syntax] i18n-ISSUE-306: reference to space character

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 15 Jan 2014 14:04:17 -0800
Message-ID: <CAAWBYDCPV46m4rONLwkQN8o=-8BGMN+9Uy6_cwPn7CTt3wTw3w@mail.gmail.com>
To: Richard Ishida <ishida@w3.org>
Cc: Simon Sapin <simon.sapin@exyr.org>, www-style <www-style@w3.org>, WWW International <www-international@w3.org>
On Wed, Jan 15, 2014 at 8:06 AM, Richard Ishida <ishida@w3.org> wrote:
> On 07/01/2014 23:31, Simon Sapin wrote:
>> http://www.w3.org/International/track/issues/306
>>>>
>>>>  where XXX is a sequence of bytes other than 22 (ASCII for ")
>>>
>>> This is unclear and looks odd. [...]
>>
>>
>> In this rephrasing, I also avoid entirely mentioning the 0x22 ASCII
>> character. The details of the byte pattern are not central to this note.
>
> Actually, i think there's still a problem here. If the @charset 'thing' is
> to be useful (ie. recognised for fallback encoding), then it has to follow a
> precise syntax, ie. a single space between charset and quote mark, and
> double quotes used rather than single.
>
> That isn't expressed by the grammar
>
>         <at-charset-rule> = @charset <string>;

That's because the grammar for the @charset rule follows normal CSS
conventions, where you can use arbitrary whitespace, use either quote
character for strings, add comments, etc.

The grammar for the @charset has no connection whatsoever with the
byte sequence for specifying encoding information (see "The @charset
rule has no effect on a stylesheet").  You can easily create valid
@charset rules which show up in the CSSOM which have no effect on the
document encoding.  Example:

@charset    'iso-8859-1';
.foo© { color: red; }

Totally valid CSSCharsetRule shows up in the stylesheet.  Assuming
that the file is actually saved in iso-8859-1, though, the @charset
has zero effect, and the © symbol is corrupted.  Remove the extra
whitespace, change to double-quote chars, and it'll work.

~TJ
Received on Wednesday, 15 January 2014 22:05:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:36 UTC