pypy-7.3-2.7.13 UnicodeEncodeError: 'ascii' codec can't encode character
-
parse a "big" json data file, print some utf8 code is error
-
if its a "little" json data file, no error happend.
-
if i use pypy-6.0.0-2.7 there is no error
-
so i think this is a bug of pypy7.3
-
sample code is:
pypy make-test-data.py
pypy test2.py
- exception is:
Traceback (most recent call last):
File "test2.py", line 194, in <module>
ConfigureHelper.decode_utf8_objs(datas)
File "test2.py", line 132, in decode_utf8_objs
ndatas[key] = self.decode_utf8_objs(val)
File "test2.py", line 137, in decode_utf8_objs
ndatas.append(self.decode_utf8_objs(val))
File "test2.py", line 132, in decode_utf8_objs
ndatas[key] = self.decode_utf8_objs(val)
File "test2.py", line 123, in decode_utf8_objs
print "decode_utf8_objs ", type(datas), "repr=", datas
UnicodeEncodeError: 'ascii' codec can't encode character u'\u94bb' in position 0: ordinal not in range(128)
- the python code please see the attach file
- my pypy version is
- Python 2.7.13 (724f1a7d62e8, Feb 29 2020, 09:21:35)
- [PyPy 7.3.0 with GCC 9.2.0]
- i build it myself with pypy2.7-v7.3.0-src.tar.bz2 + GCC9.2 + CentOs7-64bit-Lasted
- i use pypy2.7-v7.3.0-linux64 (download form https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.3.0-linux64.tar.bz2) also the same error