[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 #9 from Henri Sivonen <hsivonen@iki.fi> 2011-05-05 06:58:08 UTC ---
(In reply to comment #7)
> That's the kind of bug I think we should be trying to fix here. I'll be the
> first to say it shouldn't be a high priority.

What's the payoff from "fixing" it?

> But it's the kind of thing that
> can be fixed as people go through codebases, little fix here, little fix there,
> until eventually it's all Unicode clean (except the DOM, which is a lost cause,
> sadly).

In Firefox, e.g. alert text is laid out and painted using the same machinery
that is used for laying out and painting general DOM content, so that machinery
has to deal with unpaired surrogates anyway without catching fire. How would
the Web be better if window.alert() had extra code for doing something else
with unpaired surrogates?

-- 
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 Thursday, 5 May 2011 06:58:10 UTC