diff --git a/pypy/objspace/std/unicodeobject.py b/pypy/objspace/std/unicodeobject.py index 2c80679261a647f9c9350288fefa94f33cf0f72b..42fb93e0a48863aab5588f19145c971e1649142a 100644 --- a/pypy/objspace/std/unicodeobject.py +++ b/pypy/objspace/std/unicodeobject.py @@ -103,7 +103,7 @@ class W_UnicodeObject(W_Root): return space.newint(uid) def str_w(self, space): - return space.text_w(encode_object(space, self, 'ascii', 'strict')) + return space.text_w(encode_object(space, self, None, 'strict')) def utf8_w(self, space): return self._utf8 @@ -244,7 +244,7 @@ class W_UnicodeObject(W_Root): return space.newtext(_repr_function(self._utf8)) def descr_str(self, space): - return encode_object(space, self, 'ascii', 'strict') + return encode_object(space, self, None, 'strict') def hash_w(self): # shortcut for UnicodeDictStrategy