Designing Custom Encoders

Data Encoding

For GlassFish ESB to correctly handle data in byte-oriented protocol, the encoding method for inbound and outbound Encoders and the native code used for parsing must be specified in the Encoding properties. If you do not specify otherwise, UTF-8 is assumed to be the encoding method in each case.

Supporting UTF-8 by default allows the use of the Unicode character set in both ASCII and non-ASCII based environments without further specification. GlassFish ESB also supports ASCII for English, Japanese, and Korean locales, and the localized country-specific encoding methods shown in the following table.

The data encoding you specify when configuring the Encoding properties modifies the Java methods used for encoding and decoding. The encoding and decoding processes differ from one another depending upon which Java method you use, and whether you are encoding to or decoding from bytes or strings. The diagrams shown in About Data Parsing and Serialization illustrate these differences.

The encoding options available to you depend on the locale specified by your version of GlassFish ESB. UTF-8 is the default in all locales.

Table 6 Partial Listing of Supported Encoding Options According to Locale

English 

Japanese 

Korean 

Simplified Chinese 

Traditional Chinese 

UTF-8 

UTF-8 

UTF-8 

UTF-8 

UTF-8 

ASCII 

ASCII 

ASCII 

GB2312 

Big5 

EBCDIC 

EUC-JP 

EUC-KR 

   

UTF-16 

SJIS 

MS949 

   
 

MS932