Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95640:4821ebc434d0
Date: 2019-01-15 20:09 +0200
http://bitbucket.org/pypy/pypy/changeset/4821ebc434d0/

Log:    decoder returns result, len(utf8), not result, len(unicode)

diff --git a/pypy/module/_codecs/interp_codecs.py 
b/pypy/module/_codecs/interp_codecs.py
--- a/pypy/module/_codecs/interp_codecs.py
+++ b/pypy/module/_codecs/interp_codecs.py
@@ -1009,7 +1009,7 @@
         string, errors,
         final, state.decode_error_handler)
     return space.newtuple([space.newutf8(result, lgt),
-                           space.newint(lgt)])
+                           space.newint(len(string))])
 
 @unwrap_spec(errors='text_or_none')
 def unicode_internal_encode(space, w_uni, errors="strict"):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to