Bug 180105
Summary: | jsc binary operates on UTF-8-encoded bytes rather than actual source text | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mathias Bynens <mathias> |
Component: | JavaScriptCore | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Mathias Bynens
https://bugs.webkit.org/show_bug.cgi?id=180105
Mathias Bynens
Fixed in 180205.
Alexey Proskuryakov
*** This bug has been marked as a duplicate of bug 180205 ***