adds {escaped_unicode, replace} option that replaces illegal escape sequences with the unicode replacement character u+fffd when encountered

This commit is contained in:
alisdair sullivan 2011-07-22 23:47:35 -07:00
parent b4eaf15dbe
commit 66f5e0b48a
6 changed files with 56 additions and 9 deletions

View file

@ -0,0 +1 @@
[ "non-character: ", "\uffff" ]

View file

@ -0,0 +1,7 @@
{name, "unicode_replaced"}.
{jsx, [start_array,
{string,"non-character: "},
{string,[16#fffd]},
end_array,end_json]}.
{json, "unicode_replaced.json"}.
{jsx_flags, [{escaped_unicode,replace}]}.

View file

@ -0,0 +1 @@
[ "non-character: ", "\uffff" ]

View file

@ -0,0 +1,7 @@
{name, "unicode_to_codepoint_noncharacter"}.
{jsx, [start_array,
{string,"non-character: "},
{string,"\\uffff"},
end_array,end_json]}.
{json, "unicode_to_codepoint_noncharacter.json"}.
{jsx_flags, [{escaped_unicode,codepoint}]}.