Comment #0 by dlang-bugzilla — 2017-06-26T08:33:42Z
/////////////////// test.d ///////////////////
import std.json;
import std.stdio;
void main()
{
auto v = JSONValue("\U0001D11E");
writeln(toJSON(v, false,
JSONOptions.escapeNonAsciiChars));
}
//////////////////////////////////////////////
Above program prints "\uD11E", which is not the correct character.
Non-BMP characters should be encoded as a pair of escaped UTF-16 surrogate pairs, as per RFC 4627.
See also issue 5904.
Comment #1 by dlang-bugzilla — 2017-06-26T10:03:41Z