[pypy-svn] r48674 - pypy/branch/more-unicode-improvements/pypy/objspace/std

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Nov 14 11:05:27 CET 2007


Author: cfbolz
Date: Wed Nov 14 11:05:27 2007
New Revision: 48674

Modified:
   pypy/branch/more-unicode-improvements/pypy/objspace/std/unicodetype.py
Log:
unfail some string tests


Modified: pypy/branch/more-unicode-improvements/pypy/objspace/std/unicodetype.py
==============================================================================
--- pypy/branch/more-unicode-improvements/pypy/objspace/std/unicodetype.py	(original)
+++ pypy/branch/more-unicode-improvements/pypy/objspace/std/unicodetype.py	Wed Nov 14 11:05:27 2007
@@ -159,6 +159,8 @@
 def encode_object(space, w_object, encoding, errors):
     w_codecs = space.getbuiltinmodule("_codecs")
     w_encode = space.getattr(w_codecs, space.wrap("encode"))
+    if encoding is None:
+        encoding = getdefaultencoding(space)
     if errors is None:
         w_retval = space.call_function(w_encode, w_object, space.wrap(encoding))
     else:



More information about the Pypy-commit mailing list