From: Martin v. Löwis Date: Thu, 26 Sep 2002 16:41:10 +0000 (+0000) Subject: Disable big charsets in UCS-4 builds. Works around #599377. X-Git-Tag: v2.2.2b1~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12315fd0613c079f2ee82f6aaacca85b667001e1;p=thirdparty%2FPython%2Fcpython.git Disable big charsets in UCS-4 builds. Works around #599377. --- diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 1175f6731820..424604bf8243 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -188,6 +188,9 @@ def _optimize_charset(charset, fixup): # XXX: could append to charmap tail return charset # cannot compress except IndexError: + if sys.maxunicode != 65535: + # XXX: big charsets don't work in UCS-4 builds + return charset # character set contains unicode characters return _optimize_unicode(charset, fixup) # compress character map