Bug 180105

Summary: jsc binary operates on UTF-8-encoded bytes rather than actual source text
Product: WebKit Reporter: Mathias Bynens <mathias>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: keith_miller, mathias, msaboff
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 180205    
Bug Blocks:    

Mathias Bynens
Reported 2017-11-28 13:39:37 PST
There is a difference between input entered directly into the jsc REPL (through a terminal set to UTF-8) vs. passed as a file (saved with UTF-8 encoding). $ jsc -e 'print("\xCF\x80" === "π")' false $ jsc >>> print("\xCF\x80" === "π") true This might lead people to (incorrectly!) believe that e.g. jsc’s implementation of Unicode property escapes is broken: $ jsc >>> /\p{Script=Greek}/u.test("π") false $ jsc -e 'print(/\p{Script=Greek}/u.test("π"))' true
Attachments
Mathias Bynens
Comment 1 2017-12-01 11:45:09 PST
Mathias Bynens
Comment 2 2017-12-01 11:45:31 PST
Fixed in 180205.
Alexey Proskuryakov
Comment 3 2017-12-01 12:55:41 PST
*** This bug has been marked as a duplicate of bug 180205 ***
Note You need to log in before you can comment on or make changes to this bug.