Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95269:db15a8ce07d7
Date: 2018-11-01 18:18 +0200
http://bitbucket.org/pypy/pypy/changeset/db15a8ce07d7/

Log:    do not re-encode in surrogateescape (is this correct?)

diff --git a/pypy/objspace/std/unicodeobject.py 
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -1224,6 +1224,9 @@
                 # surrogatepass?
                 break 
             pos = _pos
+        if errors == 'surrogateescape':
+            #escape
+            return space.newbytes(utf8)
         w_object = space.newtext(utf8)
     if errors is None or errors == 'strict':
         if encoding is None or encoding == 'utf-8':
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to