Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.6 Changeset: r96064:a2c4c9f78c7a Date: 2019-02-18 15:05 +0200 http://bitbucket.org/pypy/pypy/changeset/a2c4c9f78c7a/
Log: use lenght in codepoints not utf8 diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py --- a/pypy/interpreter/error.py +++ b/pypy/interpreter/error.py @@ -507,11 +507,13 @@ result = str(value) lgt += len(result) elif fmt == 'R': - result = space.utf8_w(space.repr(value)) - lgt += len(result) + s = space.repr(value) + result = space.utf8_w(s) + lgt += space.len_w(s) elif fmt == 'S': - result = space.utf8_w(space.str(value)) - lgt += len(result) + s = space.str(value) + result = space.utf8_w(s) + lgt += space.len_w(s) elif fmt == 'T': result = space.type(value).name lgt += len(result) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit