Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
99ac3283
Commit
99ac3283
authored
Oct 18, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify that lower-higher case delta are 16-bit.
parent
d8eeeae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
Tools/unicode/makeunicodedata.py
Tools/unicode/makeunicodedata.py
+11
-3
No files found.
Tools/unicode/makeunicodedata.py
View file @
99ac3283
...
...
@@ -223,15 +223,21 @@ def makeunicodetype(unicode, trace):
flags
|=
UPPER_MASK
# use delta predictor for upper/lower/title
if
record
[
12
]:
upper
=
(
int
(
record
[
12
],
16
)
-
char
)
&
0xffff
upper
=
int
(
record
[
12
],
16
)
-
char
assert
-
32768
<=
upper
<=
32767
upper
=
upper
&
0xffff
else
:
upper
=
0
if
record
[
13
]:
lower
=
(
int
(
record
[
13
],
16
)
-
char
)
&
0xffff
lower
=
int
(
record
[
13
],
16
)
-
char
assert
-
32768
<=
lower
<=
32767
lower
=
lower
&
0xffff
else
:
lower
=
0
if
record
[
14
]:
title
=
(
int
(
record
[
14
],
16
)
-
char
)
&
0xffff
title
=
int
(
record
[
14
],
16
)
-
char
assert
-
32768
<=
lower
<=
32767
title
=
title
&
0xffff
else
:
title
=
0
# decimal digit, integer digit
...
...
@@ -322,6 +328,8 @@ def makeunicodename(unicode, trace):
wordlist
=
words
.
items
()
# sort on falling frequency
# XXX: different Python versions produce a different order
# for words with equal frequency
wordlist
.
sort
(
lambda
a
,
b
:
len
(
b
[
1
])
-
len
(
a
[
1
]))
# figure out how many phrasebook escapes we need
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment