adds loose_unicode option which replaces badly formed unicode (escaped non-characters and restricted codepoints, as well as partial surrogates) with u+fffd instead of throwing an error

This commit is contained in:
alisdair sullivan 2011-07-27 01:59:03 -07:00
parent 51d27bb3b5
commit 653205501c
15 changed files with 121 additions and 10 deletions

View file

@ -0,0 +1,4 @@
{name, "unpaired surrogate replaced"}.
{jsx, [start_array,{string,<<16#fffd/utf8, "blah">>},end_array,end_json]}.
{json, "unpaired_surrogate_replaced.json"}.
{jsx_flags, [loose_unicode]}.