RESOLVED FIXED26802
JSON.parse fails to parse valid JSON with most Unicode characters
https://bugs.webkit.org/show_bug.cgi?id=26802
Summary JSON.parse fails to parse valid JSON with most Unicode characters
Daniel Fazekas
Reported 2009-06-29 10:03:48 PDT
The new native JSON support in the nightly builds breaks most non-Western Latin websites, as it fails to parse almost any character other than certain basic Latin 1 letters. Example: JSON.parse('"•"'); SyntaxError: Unable to parse JSON string It even fails to round-trip between its own stringify and parse: JSON.parse(JSON.stringify('•')); SyntaxError: Unable to parse JSON string These of course all work fine with Firefox 3.5, IE 8.0 or Douglas Crockford's JSON2.js.
Attachments
Fixeration! (4.62 KB, patch)
2009-06-29 13:18 PDT, Oliver Hunt
barraclough: review+
Mark Rowe (bdash)
Comment 1 2009-06-29 11:02:08 PDT
Oliver Hunt
Comment 2 2009-06-29 13:18:52 PDT
Created attachment 32018 [details] Fixeration!
Gavin Barraclough
Comment 3 2009-06-29 15:28:10 PDT
Comment on attachment 32018 [details] Fixeration! In the ChangeLog, 'I' is spelled incorrectly. :-P
Oliver Hunt
Comment 4 2009-06-29 15:34:30 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M JavaScriptCore/ChangeLog M JavaScriptCore/runtime/LiteralParser.cpp M LayoutTests/ChangeLog M LayoutTests/fast/js/JSON-parse-expected.txt M LayoutTests/fast/js/resources/JSON-parse.js Committed r45356
Note You need to log in before you can comment on or make changes to this bug.