Specifying character encoding information for plain text documents
To properly decode plain text documents, the Java™ viewer toolkit requires that the character encoding to be provided by the application.
The CCSID information for a part can be obtained from the getCCSID method on the DKTextICM Java API or the CMBObject Java bean. This can be translated to a Java character encoding by using the CMBDocumentServices.getEncodingforCCSID method. The resulting character encoding can then be provided on the CMBStreamingDocServices.loadDocument method when loading a document, and provided on the getPartEncoding callback for multi-part documents. Note that if the encoding is not provided on loadDocument and the getPartEncoding callback is not implemented, the character encoding that will be used will be the default as defined by Java for the current locale.
For implementation details, see the following items in the Application Programming Reference:
- DKTextICM methods
- getCCSID
- setCCSID
- Java Beans
- CMBObject.setCCSID
- CMBObject.getCCSID
- CMBDocumentServices.getEncodingforCCSID
- CMBDocumentServices.getCCSIDforEncoding
- CMBStreamingDocServices.loadDocument
- CMBStreamingDocServicesCallbacks.getPartEncoding
- CMBDocumentEngine.loadDocument
- CMBDocumentEngineCallbacks.getPartEncoding