Author: fijal
Branch: unicode-utf8
Changeset: r92616:5118754f8566
Date: 2017-10-05 18:51 +0200
http://bitbucket.org/pypy/pypy/changeset/5118754f8566/

Log:    change the signature of never called functions

diff --git a/rpython/rlib/runicode.py b/rpython/rlib/runicode.py
--- a/rpython/rlib/runicode.py
+++ b/rpython/rlib/runicode.py
@@ -95,17 +95,17 @@
 def default_unicode_error_decode(errors, encoding, msg, s,
                                  startingpos, endingpos):
     if errors == 'replace':
-        return u'\ufffd', endingpos
+        return u'\ufffd'.encode('utf8'), endingpos
     if errors == 'ignore':
-        return u'', endingpos
+        return '', endingpos
     raise UnicodeDecodeError(encoding, s, startingpos, endingpos, msg)
 
 def default_unicode_error_encode(errors, encoding, msg, u,
                                  startingpos, endingpos):
     if errors == 'replace':
-        return u'?', None, endingpos
+        return '?', None, endingpos
     if errors == 'ignore':
-        return u'', None, endingpos
+        return '', None, endingpos
     raise UnicodeEncodeError(encoding, u, startingpos, endingpos, msg)
 
 # ____________________________________________________________
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to