W3C home > Mailing lists > Public > www-style@w3.org > November 2005

Re: [CSS21] Question on character escapes

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 15 Nov 2005 18:21:31 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style Mailing List <www-style@w3.org>
Message-ID: <Pine.LNX.4.62.0511151819070.9929@dhalsim.dreamhost.com>

On Tue, 15 Nov 2005, Boris Zbarsky wrote:
> 
> I'm wondering what happens when \nnnnnnn escapes (backslash followed by 
> numbers) are used and the resulting character is invalid (eg it's a high 
> or low surrogate, or is above 0x00110000).  Should the escape be treated 
> as U+FFFD?  Or should this be considered an error and error recovery 
> (skipping a declaration or whatever needs to happen at that point in 
> parsing) happen?  Or something else?

The spec doesn't say. It also doesn't say what should happen with \0 
(indeed it calls that one out explicitly). I suggest treating them all as 
U+FFFD, and only dropping the rule if U+FFFD would cause the rule to be 
dropped at that point. (The idea is that a literal reading of 2.1 suggests 
that no codepoints can be invalid except 0, and so they should be treated 
the same way valid-but-unknown characters would be.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 15 November 2005 18:21:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:41 GMT