[pypy-commit] pypy unicode-utf8-py3: default for allow_surrogates is False

mattip pypy.commits at gmail.com
Wed Sep 12 08:38:49 EDT 2018


Author: Matti Picus <matti.picus at gmail.com>
Branch: unicode-utf8-py3
Changeset: r95109:801748ba582a
Date: 2018-09-12 14:16 +0300
http://bitbucket.org/pypy/pypy/changeset/801748ba582a/

Log:	default for allow_surrogates is False

diff --git a/pypy/interpreter/unicodehelper.py b/pypy/interpreter/unicodehelper.py
--- a/pypy/interpreter/unicodehelper.py
+++ b/pypy/interpreter/unicodehelper.py
@@ -1226,21 +1226,21 @@
 
 def utf8_encode_utf_16(s, errors,
                           errorhandler=None,
-                          allow_surrogates=True):
+                          allow_surrogates=False):
     return utf8_encode_utf_16_helper(s, errors, errorhandler,
                                         allow_surrogates, "native",
                                         'utf-16-' + BYTEORDER2)
 
 def utf8_encode_utf_16_be(s, errors,
                              errorhandler=None,
-                             allow_surrogates=True):
+                             allow_surrogates=False):
     return utf8_encode_utf_16_helper(s, errors, errorhandler,
                                         allow_surrogates, "big",
                                         'utf-16-be')
 
 def utf8_encode_utf_16_le(s, errors,
                              errorhandler=None,
-                             allow_surrogates=True):
+                             allow_surrogates=False):
     return utf8_encode_utf_16_helper(s, errors, errorhandler,
                                         allow_surrogates, "little",
                                         'utf-16-le')


More information about the pypy-commit mailing list