[pypy-issue] Issue #2729: PyPy3-5.10 incorrectly decodes astral plane JSON characters (pypy/pypy)
Ned Batchelder
issues-reply at bitbucket.org
Sun Jan 7 06:43:32 EST 2018
New issue 2729: PyPy3-5.10 incorrectly decodes astral plane JSON characters
https://bitbucket.org/pypy/pypy/issues/2729/pypy3-510-incorrectly-decodes-astral-plane
Ned Batchelder:
This is a regression from pypy3-5.9
```
note = u"a\xa0\u266b\U0001d157"
round_tripped = json.loads(json.dumps({"note": note}))['note']
print(ascii(note))
print(ascii(round_tripped))
```
PyPy3-5.9 printed:
```
'a\xa0\u266b\U0001d157'
'a\xa0\u266b\U0001d157'
```
(as does every CPython 3.x)
PyPy3-5.10 prints:
```
'a\xa0\u266b\U0001d157'
'a\xa0\u266b\ud834\udd57'
```
This is on a Mac. The PyPy2-5.10 binary didn't work at all for me, so I'm not sure what it produces.
More information about the pypy-issue
mailing list