diff Tools/unicode/makeunicodedata.py @ 74423:03ea95e3b497

delta encoding of upper/lower/title makes a glorious return (#12736)
author Benjamin Peterson <benjamin@python.org>
date Sun, 15 Jan 2012 21:19:20 -0500
parents d4669f43d05f
children cd21e6d30a1a
line wrap: on
line diff
--- a/Tools/unicode/makeunicodedata.py	Sun Jan 15 19:31:57 2012 -0600
+++ b/Tools/unicode/makeunicodedata.py	Sun Jan 15 21:19:20 2012 -0500
@@ -443,6 +443,13 @@
             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