[Bug 12100] UAs do not actually convert DOMStrings to sequences of Unicode characters. Test case: data:text/html,<!doctype html><script>document.documentElement.title = "\ud800"; alert(document.documentElement.title.charCodeAt(0));</script> Expected 65533, got 5529

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12100

--- Comment #2 from Aryeh Gregor <Simetrical+w3cbug@gmail.com> 2011-02-18 19:03:26 UTC ---
IIRC, Hixie added this line along with my atob/btoa stuff, since my spec for
that started by converting the input to a sequence of Unicode characters.  He
extended it to everything, not just atob/btoa.  In the case of atob/btoa I was
just doing it because it let me pretend that I was dealing with characters
instead of code units; anything over U+FF would cause an exception to be thrown
anyway, so it made no difference except in terminology.  But that's not
necessarily safe at all for arbitrary DOMStrings.

For atob/btoa, it would probably be best to just rephrase it in terms of code
units.  It will be more confusing to average authors, but oh well.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 18 February 2011 19:03:28 UTC