Author: Matti Picus <[email protected]>
Branch:
Changeset: r96732:5604ceb9aa78
Date: 2019-05-30 16:51 +0300
http://bitbucket.org/pypy/pypy/changeset/5604ceb9aa78/
Log: win32, python2 doesn't like surrogates, skip this check
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
@@ -1,5 +1,7 @@
"""The builtin unicode implementation"""
+import sys
+
from rpython.rlib.objectmodel import (
compute_hash, compute_unique_id, import_from_mixin, always_inline,
enforceargs, newlist_hint, specialize, we_are_translated)
@@ -41,7 +43,7 @@
self._utf8 = utf8str
self._length = length
self._index_storage = rutf8.null_storage()
- if not we_are_translated():
+ if not we_are_translated() and not sys.platform == 'win32':
# utf8str must always be a valid utf8 string, except maybe with
# explicit surrogate characters---which .decode('utf-8') doesn't
# special-case in Python 2, which is exactly what we want here
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit