RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1694518 - Update unicodedata_db.h to include the latest UCD after Japanese new Era name is publicly announced.
Summary: Update unicodedata_db.h to include the latest UCD after Japanese new Era name...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python
Version: 7.6
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks: 1696002
TreeView+ depends on / blocked
 
Reported: 2019-04-01 01:57 UTC by Keigo Noha
Modified: 2021-08-30 12:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-16 13:10:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2749651 0 Learn more None Does the change of the Japanese Era affect Red Hat Enterprise Linux? 2019-04-01 02:09:26 UTC

Description Keigo Noha 2019-04-01 01:57:30 UTC
Description of problem:
Update unicodedata_db.h to include the latest UCD after Japanese new Era name is publicly announced.

Version-Release number of selected component (if applicable):
Python2 in RHEL7.

Additional info:
Japanese government will announce the new Japanese Era name on April 1st.
After the announcement, the Unicode Consortium will map the new era name's ligature to U+32FF and they will update the Unicode Character Database for normalization.

This fix should be done in Python3 in RHEL8 also.

Comment 6 Petr Viktorin (pviktori) 2019-05-21 13:40:40 UTC
FWIW, the character is in Unicode 12.1

Comment 7 Victor Stinner 2019-05-21 13:51:09 UTC
There are 2 things:

* U+32FF character name: "SQUARE ERA NAME REIWA"
* U+32FF (㋿) character should be normalized as the two characters {U+4ee4, U+548c} (令和)

Example with Python 3.8 alpha 4 (3.8 dev branch) which uses Unicode 12.1.0:

Python 3.8.0a4+ (heads/master:4fb1502189, May 21 2019, 15:20:53) 
>>> import unicodedata
>>> unicodedata.name(u'\u32ff')
'SQUARE ERA NAME REIWA'
>>> print(ascii(unicodedata.normalize('NFKD', u'\u32ff')))
'\u4ee4\u548c'
>>> unicodedata.unidata_version
'12.1.0'

Python 3.7.3 on Fedora 29 uses Unicode 11.0 which isn't aware of U+32FF:

vstinner@apu$ python3
Python 3.7.3 (default, Mar 27 2019, 13:41:07) 
>>> import unicodedata
>>> print(ascii(unicodedata.normalize('NFKD', u'\u32ff')))
'\u32ff'
>>> unicodedata.name(u'\u32ff')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: no such name

The problem is that updating the Unicode database is tedious. It's not only a matter of updating the data. It's also about updating the *code* to respect newer Unicode standard. This work has been done in every release of Python 3.x.

Sadly, I don't think that this work can be done in Python 2.7 and 3.6 (to upgrade to Unicode 12.1 database).

Comment 8 Keigo Noha 2019-06-13 09:35:49 UTC
Hi Petr,

I'm sorry for the late.
If updating whole database makes possible trouble or regression, we just backport REIWA specific things into Python2.

Is it reasonable to the engineering team?

Kind Regards,
Keigo Noha

Comment 9 Victor Stinner 2019-06-17 09:35:06 UTC
> we just backport REIWA specific things into Python2

The Tools/unicode/makeunicodedata.py script builds Modules/unicodedata_db.h from the Unicode data files. I don't think that it's possible to modify Modules/unicodedata_db.h.

Comment 10 Petr Viktorin (pviktori) 2019-06-18 13:33:52 UTC
Can we get a list of the REIWA specific things?

Comment 11 Petr Viktorin (pviktori) 2019-07-16 13:10:42 UTC
Based on the info we have available, not updating Python's Unicode database is OK.
As the KB article says:

If your application use those functionality and request to update the hardcoded database, please open a support case to Red Hat Technical Support with an actual business impact by this issue.


Note You need to log in before you can comment on or make changes to this bug.