Skip to content

Request for new method int NLS.charsetToCCSID( Charset ); #275

@Stefan4112

Description

@Stefan4112

Java has the class Charset that can replace the encoding name string. The problem with Charset is that Java changed names (long time ago...). For example from "Cp850" to "IBM850" (CCSID 850). And the name "IBM850" is unknown by jtopen. Instead of adding all aliases known by Java, I propose to support Charset.

int NLS.charsetToCCSID( Charset );

Code example to show problem:

String encoding = NLS.ccsidToEncoding(850)  // returns "Cp850"
Charset charset = Charset.forName(encoding)
String encoding2 = charset.name() // returns "IBM850" because "Cp850" is the old name

The name change can be found here:
https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
https://docs.oracle.com/en/java/javase/25/intl/supported-encodings.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions