From 4833b4c003651ff11827cb1a23ec842c4de2ebb5 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 24 May 2016 07:57:30 -0700 Subject: Surrogate checking is unpredictable, so always manually check. --- python/google/protobuf/json_format.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'python/google') diff --git a/python/google/protobuf/json_format.py b/python/google/protobuf/json_format.py index 8af6cd20..be6a9b63 100644 --- a/python/google/protobuf/json_format.py +++ b/python/google/protobuf/json_format.py @@ -69,10 +69,9 @@ _INFINITY = 'Infinity' _NEG_INFINITY = '-Infinity' _NAN = 'NaN' -if sys.version_info < (3, 0): - _UNPAIRED_SURROGATE_PATTERN = re.compile(six.u( - r'[\ud800-\udbff](?![\udc00-\udfff])|(?