Bug 22964 - The Japanese Era name will be changed on May 1, 2019
Summary: The Japanese Era name will be changed on May 1, 2019
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: 2.26
: P2 normal
Target Milestone: 2.30
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 24405 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-14 08:09 UTC by Florian Weimer
Modified: 2019-04-03 22:27 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2018-03-14 08:09:02 UTC
Yoko Oguma pointed out that glibc hard-codes information about the Japanese Era name:

    era     "+:2:1990/01/01:+*:平成:%EC%Ey年";/
            "+:1:1989/01/08:1989/12/31:平成:%EC元年";/
            "+:2:1927/01/01:1989/01/07:昭和:%EC%Ey年";/
            "+:1:1926/12/25:1926/12/31:昭和:%EC元年";/
            "+:2:1913/01/01:1926/12/24:大正:%EC%Ey年";/
            "+:2:1912/07/30:1912/12/31:大正:%EC元年";/
            "+:6:1873/01/01:1912/07/29:明治:%EC%Ey年";/
            "+:1:0001/01/01:1872/12/31:西暦:%EC%Ey年";/
            "+:1:-0001/12/31:-*:紀元前:%EC%Ey年"

This will change due to the abdication.

Additional information:
https://en.wikipedia.org/wiki/Japanese_imperial_transition,_2019
https://en.wikipedia.org/wiki/Japanese_era_name
Comment 1 Florian Weimer 2019-04-01 08:50:05 UTC
*** Bug 24405 has been marked as a duplicate of this bug. ***
Comment 2 Florian Weimer 2019-04-01 08:54:19 UTC
<https://www.kantei.go.jp/jp/tyoukanpress/201904/1_a.html> suggests that two new characters will be U+4EE4 U+548C:

新しい元号は「令和」であります。
Comment 3 cvs-commit@gcc.gnu.org 2019-04-02 07:49:54 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  466afec30896585b60c2106df7a722a86247c9f3 (commit)
       via  84aea16929f310625a52bf9c3db3341f56970ab0 (commit)
       via  2f1d61552d429c4e1cbcec115f3cc3dcaf91400d (commit)
       via  2c7e704b7e590e9895155529f1480e2cdea5424f (commit)
      from  62449176e035e47adc543c1b8cf2075edaaf4742 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=466afec30896585b60c2106df7a722a86247c9f3

commit 466afec30896585b60c2106df7a722a86247c9f3
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Tue Apr 2 16:46:55 2019 +0900

    ja_JP locale: Add entry for the new Japanese era [BZ #22964]
    
    The Japanese era name will be changed on May 1, 2019.  The Japanese
    government made a preliminary announcement on April 1, 2019.
    
    The glibc ja_JP locale must be updated to include the new era name for
    strftime's alternative year format support.
    
    Checked on x86_64-linux-gnu.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    
    ChangeLog:
    
    	[BZ #22964]
    	* localedata/locales/ja_JP (LC_TIME): Add entry for the new Japanese
    	era.
    	* time/tst-strftime2.c (dates): Add 2019-04-30 and 2019-05-01.
    	(mkreftable): Add rules for the new Japanese era and the new dates.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=84aea16929f310625a52bf9c3db3341f56970ab0

commit 84aea16929f310625a52bf9c3db3341f56970ab0
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Tue Apr 2 16:42:04 2019 +0900

    time: Add tests for Minguo calendar [BZ #24293]
    
    Co-authored-by: Rafal Luzynski <digitalfreak@lingonborough.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    
    ChangeLog:
    
    	[BZ #24293]
    	* time/Makefile (LOCALES): Add zh_TW.UTF-8, cmn_TW.UTF-8,
    	hak_TW.UTF-8, nan_TW.UTF-8, and lzh_TW.UTF-8.
    	* time/tst-strftime2.c (locales): Likewise.
    	(dates): Add 1910-04-01, 1911-12-31, 1912-01-01, 1913-04-01,
    	2010-04-01, and 2011-04-01.
    	(mkreftable): Add rules for the new locales and the new dates.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2f1d61552d429c4e1cbcec115f3cc3dcaf91400d

commit 2f1d61552d429c4e1cbcec115f3cc3dcaf91400d
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Tue Apr 2 16:37:03 2019 +0900

    time/tst-strftime2.c: Make the file easier to maintain
    
    Express the years as full Gregorian years (e.g., 1988 instead of 88)
    and months with natural numbers (1-12 rather than 0-11).
    
    Compare actual dates rather than indexes when selecting the era name.
    
    Declare the local variable era as a string character pointer rather
    than an array of chars where the actual string is copied which might
    lead to potential buffer overflows in future.
    
    Co-authored-by: Rafal Luzynski <digitalfreak@lingonborough.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    
    ChangeLog:
    
    	* time/tst-strftime2.c (date_t): Explicitly define the type.
    	(dates): Use natural month and year numbers to express a date.
    	(is_before): New function to compare dates.
    	(mkreftable): Minor improvements to simplify maintenance.
    	(do_test): Reflect the changes in dates array.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2c7e704b7e590e9895155529f1480e2cdea5424f

commit 2c7e704b7e590e9895155529f1480e2cdea5424f
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Tue Apr 2 16:25:35 2019 +0900

    NEWS: Mention Minguo calendar support added [BZ #24293]
    
    Co-authored-by: Rafal Luzynski <digitalfreak@lingonborough.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |   25 ++++++++
 NEWS                     |    6 ++
 localedata/locales/ja_JP |    6 +-
 time/Makefile            |    4 +-
 time/tst-strftime2.c     |  139 +++++++++++++++++++++++++++++++++-------------
 5 files changed, 139 insertions(+), 41 deletions(-)
Comment 4 Carlos O'Donell 2019-04-02 18:49:36 UTC
This is fixed as of 466afec30896585b60c2106df7a722a86247c9f3 and will be a part of the 2.30 release.
Comment 5 cvs-commit@gcc.gnu.org 2019-04-03 04:01:33 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.27/master has been updated
       via  de9d4aa3534282645fde9d3a4a1113a947a057db (commit)
      from  1ab314d8d3ed8a62b5e93c02eb73e1f399d5e370 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=de9d4aa3534282645fde9d3a4a1113a947a057db

commit de9d4aa3534282645fde9d3a4a1113a947a057db
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Tue Apr 2 16:46:55 2019 +0900

    ja_JP locale: Add entry for the new Japanese era [BZ #22964]
    
    The Japanese era name will be changed on May 1, 2019.  The Japanese
    government made a preliminary announcement on April 1, 2019.
    
    The glibc ja_JP locale must be updated to include the new era name for
    strftime's alternative year format support.
    
    This is a minimal cherry pick of just the required locale changes.
    
    (cherry picked from commit 466afec30896585b60c2106df7a722a86247c9f3)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    6 ++++++
 NEWS                     |    2 ++
 localedata/locales/ja_JP |    4 +++-
 3 files changed, 11 insertions(+), 1 deletions(-)
Comment 6 cvs-commit@gcc.gnu.org 2019-04-03 17:46:40 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.29/master has been updated
       via  0941350c20a52447e53c5169354408e3db591f73 (commit)
      from  e28ad442e73b00ae2047d89c8cc7f9b2a0de5436 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0941350c20a52447e53c5169354408e3db591f73

commit 0941350c20a52447e53c5169354408e3db591f73
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Tue Apr 2 16:46:55 2019 +0900

    ja_JP locale: Add entry for the new Japanese era [BZ #22964]
    
    The Japanese era name will be changed on May 1, 2019.  The Japanese
    government made a preliminary announcement on April 1, 2019.
    
    The glibc ja_JP locale must be updated to include the new era name for
    strftime's alternative year format support.
    
    This is a minimal cherry pick of just the required locale changes.
    
    (cherry picked from commit 466afec30896585b60c2106df7a722a86247c9f3)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    6 ++++++
 NEWS                     |    4 ++++
 localedata/locales/ja_JP |    4 +++-
 3 files changed, 13 insertions(+), 1 deletions(-)
Comment 7 Steven R. Loomis 2019-04-03 20:35:55 UTC
c.f.:
- CLDR data in https://unicode.org/cldr/trac/ticket/11796
- OpenJDK: https://bugs.openjdk.java.net/browse/JDK-8205432
Comment 8 cvs-commit@gcc.gnu.org 2019-04-03 22:27:19 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.28/master has been updated
       via  7423da211d1490d9fc76c2f0ce49e5dd90ea9bcc (commit)
      from  4aeff335ca19286ee2382d8eba794ae5fd49281a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7423da211d1490d9fc76c2f0ce49e5dd90ea9bcc

commit 7423da211d1490d9fc76c2f0ce49e5dd90ea9bcc
Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
Date:   Wed Apr 3 18:23:14 2019 -0400

    ja_JP locale: Add entry for the new Japanese era [BZ #22964]
    
    The Japanese era name will be changed on May 1, 2019.  The Japanese
    government made a preliminary announcement on April 1, 2019.
    
    The glibc ja_JP locale must be updated to include the new era name for
    strftime's alternative year format support.
    
    This is a minimal cherry pick of just the required locale changes.
    
    (cherry picked from commit 466afec30896585b60c2106df7a722a86247c9f3)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    6 ++++++
 NEWS                     |    4 ++++
 localedata/locales/ja_JP |    4 +++-
 3 files changed, 13 insertions(+), 1 deletions(-)