Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

17.9 Character conversion facility

Because character codes in Java programs are handled as Unicode, the JDBC driver performs mutual character code conversion between HiRDB character data and Unicode. In this character code conversion process, the JDBC driver uses the encoder provided by the Java Virtual Machine.

Figure 17-1 shows the flow of mutual character code conversion between HiRDB character data and Unicode.

Figure 17-1 Flow of mutual character code conversion between HiRDB character data and Unicode

[Figure]

When the JDBC driver exchanges character data with HiRDB, it specifies the character set name to the encoder of the Java Virtual Machine. At this time, the JDBC driver gets the character encoding of the HiRDB server and specifies the character set name that corresponds to that encoding. If a character set name was specified by the ENCODELANG property or by the setEncodeLang method when the connection was established, the specified character set name is specified with priority to the encoder of the Java Virtual Machine. Therefore, if a character set name that does not correspond to the character encoding of the HiRDB server is specified in the ENCODELANG property or by the setEncodeLang method, an error occurs during character code conversion.