W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > January 2010

[Bug 8425] Cloning a DOMString with unpaired surrogates should throw SYNTAX_ERR, to allow UAs to serialise structured clones as UTF-8.

From: <bugzilla@wiggum.w3.org>
Date: Tue, 05 Jan 2010 04:06:21 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1NS0gX-0006vZ-FV@wiggum.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=8425


Maciej Stachowiak <mjs@apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjs@apple.com




--- Comment #1 from Maciej Stachowiak <mjs@apple.com>  2010-01-05 04:06:20 ---
I disagree with this suggestion:

A) DOM Strings (and ECMAScript strings) are everywhere else treated as a
sequence of UTF-16 code units and do not fail on bad surrogate pairs.

B) "Strings" with possibly invalid surrogate pairs are useful as a workaround
to store binary data, in the absence of a proper class for doing so. Thus,
throwing an exception in this case would remove useful functionality.

C) It's pretty simple to do a almost-UTF-16 --> almost-UTF-8 converter that
round trips unpaired surrogates simply by encoding them as if they were
individual Unicode characters. Thus, the limitation is not actually required to
implement the described behavior.


-- 
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 Tuesday, 5 January 2010 04:06:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:08 UTC