diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-01-16 02:19:20 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-01-16 02:19:20 (GMT) |
commit | ad9c569825a2aa550a76cfb29fa23d80648be98e (patch) | |
tree | 0446be901992bb51e66a2679c5abf437524f4f44 /Tools/unicode | |
parent | da05f454e339b48d31b70f4c43e18cd31a15d434 (diff) | |
download | cpython-ad9c569825a2aa550a76cfb29fa23d80648be98e.zip cpython-ad9c569825a2aa550a76cfb29fa23d80648be98e.tar.gz cpython-ad9c569825a2aa550a76cfb29fa23d80648be98e.tar.bz2 |
delta encoding of upper/lower/title makes a glorious return (#12736)
Diffstat (limited to 'Tools/unicode')
-rw-r--r-- | Tools/unicode/makeunicodedata.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tools/unicode/makeunicodedata.py b/Tools/unicode/makeunicodedata.py index 0795d9e..17edc3c 100644 --- a/Tools/unicode/makeunicodedata.py +++ b/Tools/unicode/makeunicodedata.py @@ -443,6 +443,13 @@ def makeunicodetype(unicode, trace): if sc is None: if upper == lower == title: upper = lower = title = 0 + else: + upper = upper - char + lower = lower - char + title = title - char + assert (abs(upper) <= 2147483647 and + abs(lower) <= 2147483647 and + abs(title) <= 2147483647) else: # This happens either when some character maps to more than one # character in uppercase, lowercase, or titlecase or the |