Creating a charset provider module for IBM charsets

Alan Bateman Alan.Bateman at oracle.com
Wed Jun 20 13:26:56 UTC 2018


On 20/06/2018 14:22, Dave Hobbs wrote:
> Hi
>
> We would like to migrate a number of the IBM charsets (which don't need to
> be in java.base) to a modular charset provider.
>
> However, as written today our charset classes rely on sun.nio.cs classes
> and definitions, which are no longer visible. For example:
>
> sun.nio.cs.HistoricallyNamedCharset;
>
> sun.nio.cs.CharsetMapping.UNMAPPABLE_DECODING;
> sun.nio.cs.CharsetMapping.UNMAPPABLE_ENCODING;
>
> sun.nio.cs.ArrayDecoder;
> sun.nio.cs.ArrayEncoder;
>
> sun.nio.cs.Surrogate.Parser;
>
> sun.nio.cs.SingleByte.Decoder;
> sun.nio.cs.ext.DoubleByte.Decoder;
>
> sun.nio.cs.SingleByteDecoder;
> sun.nio.cs.SingleByteEncoder;
>
> Are there any alternatives to these classes in the new module system or an
> alternative approach to creating charsets?
Can you use jdk.charsets as an example? You'll see that java.base 
exports these packages to the service provider module.

-Alan


More information about the core-libs-dev mailing list