(a) Function
Specifies the character set used for character code conversion in the JDBC driver.
(b) Format
public void setEncodeLang (String encode_lang)
(c) Argument
- String encode_lang
- Specifies a character set supported by Java (such as MS932).
- If OFF is specified with this method or if nothing is specified (including in the ENCODELANG settings of Properties info and the URL), the following operation takes place.
- OFF:
- The JDBC driver determines the character set that corresponds to the character codes type of the connected HiRDB. The following table shows the correspondence between the connected HiRDB character codes type and the character encoding used by the JDBC driver:
HiRDB character codes type* | Character encoding used |
---|
lang-c | 8859_1 |
sjis | Java Virtual Machine standard encoding |
ujis | EUCJIS |
utf-8 | UTF-8 |
chinese | GB2312 |
- * The specification value is in the -c option of the pdsetup command for UNIX and the -c option of the pdntenv command for Windows. For the character codes types when the pdntenv command is not executed, see the HiRDB Version 8 Installation and Design Guide.
- None:
- For UNIX:
- The JDBC driver determines the character set that corresponds to the HiRDB character codes type.
- For Windows:
- The JDBC driver uses the following rules to determine the character set:
Java Virtual Machine standard encoding | HiRDB character codes type |
---|
SJIS | Other than SJIS |
---|
MS932 | MS932 | Character set corresponding to the HiRDB character codes type |
Other than MS932 | SJIS |
(d) Return value
None.
(e) Functional detail
In a Java program, Unicode is used for the character codes. Therefore, during character data processing with HiRDB, the JDBC driver performs mutual character code conversion between the HiRDB character data and Unicodes. For this character code conversion processing, the JDBC driver uses the encoder and decoder provided by the Java Virtual Machine. This method specifies the character set names specified by the JDBC driver for the encoder and decoder that are provided by the Java Virtual Machine.
(f) Exception that occurs
None.