Project

General

Profile

Feature #15195

Deal with new Japanese era

Added by duerst (Martin Dürst) about 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:89260]

Description

As most people in Japan should know by now, a new era of the Japanese calendar will start in May 2019.

It is not clear when the new era name will be announced, but it may be at rather short notice.

The Unicode consortium has made up a plan about how to deal with this, see http://blog.unicode.org/2018/09/new-japanese-era.html. Among else, they will encode an equivalent of the current ㍽, ㍼, ㍻, and plan to publish a special version of the Unicode standard numbered 12.1.

We should start to discuss and tentatively decide what (if anything) will be needed for Ruby. Alternatives include the following two and others inbetween.

  • Follow past years where the update to a new Unicode version is done with the Ruby version release around Christmas. That would mean we upgrade to Unicode 12 around Christmas 2019. At that time, we can include the changes in 12.1 without any problems.

  • Implement the upgrade to Unicode 12 as quickly as possible in trunk, implement Unicode 12.1 as soon as available in trunk, and backport the changes needed for the new era name to older Ruby versions.


Related issues

Related to Ruby master - Feature #15742: Add Date#jisx0301 support new Japanese eraClosedActions
Related to Ruby master - Misc #15750: Switch Unicode Version 12.1.0 back from beta to finalClosedActions
Blocked by Ruby master - Feature #15321: Update Unicode data to Unicode Version 12.0.0ClosedActions
Blocked by Ruby master - Bug #15641: Backport update to Unicode Version 12.0.0 back to Ruby 2.6 branchClosedActions
Blocks Ruby master - Bug #15740: Backport Unicode Version 12.1.0 and other Japanese new era issues to Ruby 2.6ClosedActions

Associated revisions

Revision 67441
Added by duerst (Martin Dürst) 7 months ago

update to Unicode Version 12.1.0 (beta)

Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA,
for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on
May 7th, so we go with the beta version because further changes in the data we
need are highly unlikely, and we want to make sure Ruby is ready for the new era.

  • common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES

  • enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h:
    add directory and generated data files for new version

  • lib/unicode_normalize/tables.rb: update for new character

  • test/ruby/test_regexp.rb: add test for character property age=12.1

  • test/test_unicode_normalize.rb: add test for NFKC decomposition of new character

This (mostly) completes issue #15195.

Revision 67453
Added by duerst (Martin Dürst) 7 months ago

remove Unicode 12.0.0 related directory and generated files

This completes issue #15195.

Revision 67476
Added by duerst (Martin Dürst) 6 months ago

mention support for Unicode Version 12.1.0 (issue #15195) in NEWS

Revision 67525
Added by naruse (Yui NARUSE) 6 months ago

merge revision(s) 67439,67441,67453,67476: [Backport #15740]

    change lib/unicode_normalize/tables.rb to single item per line to make diffs shorter

    * template/unicode_norm_gen.tmpl: Change formatting of output to produce only a
      single item (or range) for each line to make future diffs shorter and easier
      to understand and check.

    * lib/unicode_normalize/tables.rb: output of the above

    update to Unicode Version 12.1.0 (beta)

    Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA,
    for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on
    May 7th, so we go with the beta version because further changes in the data we
    need are highly unlikely, and we want to make sure Ruby is ready for the new era.

    * common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES

    * enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h:
      add directory and generated data files for new version

    * lib/unicode_normalize/tables.rb: update for new character

    * test/ruby/test_regexp.rb: add test for character property age=12.1

    * test/test_unicode_normalize.rb: add test for NFKC decomposition of new character

    This (mostly) completes issue #15195.

    remove Unicode 12.0.0 related directory and generated files

History

Updated by naruse (Yui NARUSE) about 1 year ago

Both plans are OK, but the latter seems fun for this big event.

#3

Updated by duerst (Martin Dürst) 11 months ago

  • Related to Feature #15321: Update Unicode data to Unicode Version 12.0.0 added
#4

Updated by duerst (Martin Dürst) 10 months ago

  • Related to deleted (Feature #15321: Update Unicode data to Unicode Version 12.0.0)
#5

Updated by duerst (Martin Dürst) 10 months ago

  • Blocked by Feature #15321: Update Unicode data to Unicode Version 12.0.0 added

Updated by duerst (Martin Dürst) 10 months ago

There has been an announcement recently in the Japanese news that the Japanese government will make sure the new era name is being published at least one month before the era change. The era change is planned for May 1st, 2019. This means that the new era name should be know on April 1st, 2019 at the latest.

#8

Updated by duerst (Martin Dürst) 8 months ago

  • Blocked by Bug #15641: Backport update to Unicode Version 12.0.0 back to Ruby 2.6 branch added

Updated by duerst (Martin Dürst) 7 months ago

  • Assignee set to duerst (Martin Dürst)

I have verified that with the beta files for Unicode Version 12.1.0 at https://www.unicode.org/Public/12.1.0/ucd/, Ruby compiles and runs all tests (make check) successfully.

Please note that different from other betas, this beta uses dummy data: The dummy for the new Japanese era name is 左右 (left right):

32FF;SQUARE ERA NAME SAYUU;So;0;L;<square> 5DE6 53F3;;;;N;;;;;

which is guaranteed to change.

#10

Updated by duerst (Martin Dürst) 7 months ago

  • Blocks Bug #15740: Backport Unicode Version 12.1.0 and other Japanese new era issues to Ruby 2.6 added

Updated by duerst (Martin Dürst) 7 months ago

  • Subject changed from How to deal with new Japanese era to Deal with new Japanese era

Changed title from "How to deal with new Japanese era" to "Deal with new Japanese era".

Updated by duerst (Martin Dürst) 7 months ago

The new era name has been announced a few minutes ago:

令和 U+4EE4 U+548C

Reading: REIWA

#13

Updated by duerst (Martin Dürst) 7 months ago

  • Related to Feature #15742: Add Date#jisx0301 support new Japanese era added

Updated by duerst (Martin Dürst) 7 months ago

A beta release for Unicode 12.1.0 should be available by tomorrow. The official release of Unicode 12.1.0 is planned for May 7.

This raises the question of whether we should release a Ruby version before May 1st (with the beta data) or after May 7th. For the former, we would have to cheat a bit by introducing some logic into the build process that can pretend that a beta version is already final.

Updated by duerst (Martin Dürst) 7 months ago

duerst (Martin Dürst) wrote:

This raises the question of whether we should release a Ruby version before May 1st (with the beta data) or after May 7th. For the former, we would have to cheat a bit by introducing some logic into the build process that can pretend that a beta version is already final.

My preference, also for issue #15742, would be to move ahead, so that Ruby users who need the new functionality can get it.

#16

Updated by duerst (Martin Dürst) 6 months ago

  • Related to Misc #15750: Switch Unicode Version 12.1.0 back from beta to final added
#17

Updated by duerst (Martin Dürst) 6 months ago

  • Status changed from Open to Closed

Also available in: Atom PDF