Re: Limiting the size of the @charset byte sequence

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:20 UTC