mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
delta encoding of upper/lower/title makes a glorious return (#12736)
This commit is contained in:
parent
da05f454e3
commit
ad9c569825
3 changed files with 1448 additions and 3544 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue