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

Re: Limiting the size of the @charset byte sequence

From: Martin J. Dürst <duerst@it.aoyama.ac.jp>
Date: Tue, 28 Jan 2014 11:02:44 +0900
Message-ID: <52E70FC4.9070506@it.aoyama.ac.jp>
To: Simon Sapin <simon.sapin@exyr.org>
CC: Henri Sivonen <hsivonen@hsivonen.fi>, "Phillips, Addison" <addison@lab126.com>, Anne van Kesteren <annevk@annevk.nl>, Richard Ishida <ishida@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Zack Weinberg <zackw@panix.com>, www-style list <www-style@w3.org>, www International <www-international@w3.org>
I would put things like what Henry says below into the Character Model 
(http://www.w3.org/TR/charmod/) if I were editing it now. Maybe it's 
worth filing an erratum, so that the issue is at least documented for 
the case that a new version of the Character Model ever gets worked on.

I have cc'ed  www-i18n-comments@w3.org as requested on 
http://www.w3.org/2005/02/charmod-fundamentals-errata.html.

Regards,    Martin.

On 2014/01/28 3:41, Simon Sapin wrote:
> On 27/01/2014 00:20, Henri Sivonen wrote:
>> It's a terribly bad idea to define an internal character encoding
>> declaration syntax in such a way that the syntax definition doesn't
>> guarantee the syntax to fit within a string of bytes shorter than N
>> bytes with a small value for N. For this reason, it's a bad idea to
>> allow an arbitrary number of whitespace characters between '@chaset'
>> and the quote. Unfortunately, CSS still fails at making the length of
>> the declaration bounded, because "get an encoding" trims white space.
>> Gecko imposes a bound on the length anyway.
>
> Gecko does for CSS like for HTML and only looks at the first 1024 bytes
> when looking for an @charset byte sequence.
>
> I updated the spec accordingly. This spec text
>
>> If the byte stream begins with
>
> is now
>
>> If the first 1024 bytes of the stream begin with
>
> https://dvcs.w3.org/hg/csswg/rev/8dd698785f16
>
Received on Tuesday, 28 January 2014 02:04:17 UTC

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