W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css3-syntax] CSS escape sequences

From: Mathias Bynens <mathias@qiwi.be>
Date: Thu, 12 Jan 2012 14:41:23 +0100
Message-ID: <CACrCd9P4=ED1OsWKnkpa8N4KXU45+bCXa_D6Mz6S81j_dnSNpQ@mail.gmail.com>
To: Jonathan Kew <jonathan@jfkew.plus.com>
Cc: www-style <www-style@w3.org>
On Thu, Jan 12, 2012 at 2:01 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> I so no reason why it should be.

Well, all existing engines (except Gecko) already support this, and
have for years. Pave The Cowpaths, etc.

> This looks suspiciously like an (inadvertent?) artifact of the use of UTF-16 as the encoding form for strings within the browser.

It does, but does that matter?

>> Should the spec be changed to reflect reality?
>
> CSS backslash-hexadecimal character escapes are supposed to represent ISO 10646 character codes, *NOT* UTF-16 code units.
>
> As such, I think interpreting "\d834\df06" as the character U+1D306 should be considered a bug, and the spec should perhaps be clarified with a note explicitly prohibiting this behavior.

As it stands, it probably is a bug, but rather than dismiss it we
could embrace it and spec it in a way that is backwards compatible
with these implementations — remember, we’re talking about *all
browsers except Firefox* here. Something like: “If a UTF-16 surrogate
pair is found, decode it as such; else, proceed as usual.”
Received on Thursday, 12 January 2012 14:13:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT