[Webkit-unassigned] [Bug 103165] New: String.fromCharCode does not support converting to Unicode chars in the extension planes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 23 18:45:10 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103165

           Summary: String.fromCharCode does not support converting to
                    Unicode chars in the extension planes
           Product: WebKit
           Version: 420+
          Platform: All
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ehoogerbeets at gmail.com


In the chrome JS console:

console.log(String.fromCharCode(119134));
텞
parseInt('1D15E', 16)
119134
parseInt('D15E', 16)
53598
console.log(String.fromCharCode(119134).charCodeAt(0));
53598

(If bugzilla doesn't support that char in this bug submission form, you should see the musical half note char U+1D15E instead of a Korean character.)

Looks like it only got the bottom 16 bits of the value. If you use the UTF-16 encoding, it works fine:

console.log(String.fromCharCode(55348) + String.fromCharCode(56670));
𝅗𝅥

(you should see the musical half note char U+1D15E)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list