Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-109559: Updateunicodedata for Unicode 15.1#109560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
benjaminp merged 12 commits intopython:mainfromSnoopJ:feature/Unicode-15.1
Sep 20, 2023
Merged
Changes from1 commit
Commits
Show all changes
12 commits
Select commitHold shift + click to select a range
21e297c
Bump UNIDATA_VERSION to 15.1
SnoopJSep 19, 2023
122a732
Label CJK ranges as in unicodedata.c
SnoopJSep 19, 2023
6d5238e
Add CJK Ideograph Extension I to CJK ranges
SnoopJSep 19, 2023
cd9cbf5
Handle non-binary character properties
SnoopJSep 19, 2023
818a36c
Update Unicode DBs for Unicode 15.1
SnoopJSep 19, 2023
24088ca
Add NEWS fragment
SnoopJSep 19, 2023
110c552
Use proper Sphinx syntax for NEWS fragment
SnoopJSep 19, 2023
d8d9f98
Use common in-source ordering for CJK extension blocks
SnoopJSep 19, 2023
27b1c13
Bump Unicode version reference in pydoc_data
SnoopJSep 19, 2023
af730eb
Revert "Bump Unicode version reference in pydoc_data"
SnoopJSep 20, 2023
0db6920
Update UCD version references to 15.1.0
SnoopJSep 20, 2023
44f6770
Update 2023-09-19-01-22-43.gh-issue-109559.ijaycU.rst
benjaminpSep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Handle non-binary character properties
  • Loading branch information
@SnoopJ
SnoopJ committedSep 19, 2023
commitcd9cbf51eaf1651f41a10b8d84b2d01ff2ebc598
8 changes: 6 additions & 2 deletionsTools/unicode/makeunicodedata.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1106,11 +1106,15 @@ def __init__(self, version, cjk_check=True):
table[i].east_asian_width = widths[i]
self.widths = widths

for char, (p,) in UcdFile(DERIVED_CORE_PROPERTIES, version).expanded():
for char, (propname, *propinfo) in UcdFile(DERIVED_CORE_PROPERTIES, version).expanded():
if propinfo:
# this is not a binary property, ignore it
continue
Comment on lines +1109 to +1112
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

All the properties defined inDerivedCoreProperties.txt happened to be binary until the latest update, so this tool was getting away with the assumption that they arealways binary.

As of Unicode 15.1, this file also includes definitions that use theIndict_Conjunct_Break (InCB) property, which is an enumeration.

With this change, the loop skips over any non-binary properties, since we have nothing to do with them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It seems like it would be safer to explicitly ignoreIndict_Conjunct_Break rather than throw out everything with a second column.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is there a particular failure mode you have in mind? My rationale here was that the current internalized DB only cares about binary properties in this file, but in practice any of theproperty types enumerated by UAX#44 could appear in a future revision.

I'm not strongly opposed to ignoring the specific property that breaks the tool against the current revision, but my rationale was that it seems safer to prevent this class of failure in the future if/when additional non-binary properties are added.


if table[char]:
# Some properties (e.g. Default_Ignorable_Code_Point)
# apply to unassigned code points; ignore them
table[char].binary_properties.add(p)
table[char].binary_properties.add(propname)

for char_range, value in UcdFile(LINE_BREAK, version):
if value not in MANDATORY_LINE_BREAKS:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp