W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css-syntax] Defining "character"

From: Simon Pieters <simonp@opera.com>
Date: Mon, 12 Aug 2013 20:47:10 +0200
To: "Simon Sapin" <simon.sapin@exyr.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style list" <www-style@w3.org>
Message-ID: <op.w1pvswefidj3kv@simons-macbook-pro.local>
On Mon, 12 Aug 2013 19:36:37 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

>> Yes. That’s fine: surrogate pairs are how you’re supposed to do non-BMP
>> codepoints in Javascript. The trouble is with unpaired surrogates:
>>
>> data:text/html,<style>body:before{}</style><script>document.styleSheets[0].cssRules[0].style.content="'-\ud834-\udd1e-'"</script>
>
> If implementations are willing to change, I'm fine with specifying
> that unpaired surrogates get transformed into U+FFFD at CSS parse
> time.

Doing that seems like a slight perf cost and basically no benefit. The DOM  
API and document.write in HTML just let lone surrogates through. I'd say  
we do that in CSS for stuff coming from CSSOM also.

-- 
Simon Pieters
Opera Software
Received on Monday, 12 August 2013 18:42:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC