Author: Matti Picus <matti.pi...@gmail.com>
Branch: unicode-utf8
Changeset: r95532:93f739e28ea2
Date: 2018-12-25 08:02 +0200
http://bitbucket.org/pypy/pypy/changeset/93f739e28ea2/

Log:    str(unicode) encodes with ascii

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
@@ -230,7 +230,7 @@
         return space.newtext(_repr_function(self._utf8))
 
     def descr_str(self, space):
-        return encode_object(space, self, 'utf8', 'strict')
+        return encode_object(space, self, 'ascii', 'strict')
 
     def descr_hash(self, space):
         x = compute_hash(self._utf8)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to