Bjoern Hoehrmann scripsit:
Is there any chance, by the way, to change `JSON.stringify` so it does
not output strings that cannot be encoded using UTF-8? Specifically,
JSON.stringify(JSON.parse("\"\uD800\""))
would need to escape the surrogate instead of emitting it literally.
No, there isn't. We've been down this road repeatedly. People can and
do use JSON strings to encode arbitrary sequences of unsigned 16-bit integers.
--
You let them out again, Old Man Willow! John Cowan
What you be a-thinking of? You should not be waking!
cowan(_at_)ccil(_dot_)org
Eat earth! Dig deep! Drink water! Go to sleep!
Bombadil is talking. http://ccil.org/~cowan