JDK-8073152 : Update Standard/ExtendedCharsets to work with module system
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-02-13
  • Updated: 2019-08-21
  • Resolved: 2015-02-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b52Fixed
Related Reports
Relates :  
Relates :  
Description
This is phase 1 of getting sun.nio.cs (java.base) and sun.nio.cs.ext (jdk.charsets) to work with module system.

The current module system implementation requires the charset that might be used during vm startup to be in
java.base module. The charset build mechanism needs to be able to configure a set of charsets that currently
in extended charsets pakcage (sun.nio.cs.ext) to be re-located into sun.nio.cs during build time.

GB18030 and EUC_TW, which both have a "huge' mapping table, will be left for the next phase. These two might
need to be re-implemented to fit into the java.base/sun.nio.cs
 
Comments
Todo list: (1) to consolidate the existing configuration files "sbcs", "dbcs", "extsbcs" and "standard-charsets" into a single configuration file to define all supported charsets, with their name, clz name, history name, package name and all aliases (2) in addition to the the "standard charsets" provider, now the "extended charsets" provider class is also to be built during the build time based on the configuration file "charsets" (3) to add a build-time mechanism to specify individual sun.nio.cs.ext charset to be built into sun.nio.cs (with a os-specific configuration file, such as stdcs-linux, stdcs-windows and stdcs-solaris) to achieve this we need to (5) to move DoubleByte, HKSCS and DelegatableDecoder classes into sun.nio.cs, so they can be used/referenced by those dbcs classes moved into sun.nio.cs (6) to change some sun.nio.cs.ext implementation charset java file to be a ".template", so the real .java can be generated during build-time with correct pkg name and aliases info.
13-02-2015