Re: [CSS21] Question on character escapes

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 UTC