Skip to main content

Software  > Globalization > 

Globalize your On Demand Business

Data interchange

In data interchange operation such as File I/O conversion, you have to consider the character encoding of the files because the character encoding of external files and Java’s internal representation of text (Unicode) are not the same, therefore, character conversion is required.

Some of the useful methods related to character conversion that are provided by Java:

  • java.io.InputStreamReader(InputStream in, String encoding) reads bytes from the input stream and translates them into characters according to a specified character encoding.
  • java.io.OutputStreamWriter (OutputStream out, String encoding) writes bytes onto the output stream after translating characters according to a specified character encoding.
  • java.lang.String (byte[] data, String encoding) constructs a new String by decoding the given byte array with the specified character encoding.

Supported Java encodings for Thai are:

  • Cp838  for z/OS and iSeries (EBCDIC)
  • MacThai for Macintosh
  • TIS-620 for Unix and Linux
  • Cp874 for OS/2
  • MS874 for Windows
  • TIS-620 for Thai Industrial Standard
  • ISO-8859-11 for ISO standard (will be available on JDK1.5)

TIS-620 defined by Thai Industrial Standard is highly recommended to use as Thai standard encoding in Java applications because it is neutral and platform independent.


gray line

Continue to Input Method


E-mail us
Easy ways to get the answers you need.
E-mail us