[pypy-commit] pypy unicode-utf8: str(unicode) encodes with ascii
mattip
pypy.commits at gmail.com
Tue Dec 25 01:46:46 EST 2018
Author: Matti Picus <matti.picus at 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)
More information about the pypy-commit
mailing list