(a) Function
Sets the name of the conversion character set for data conversion.
(b) Format
public void setEncodeLang ( String encode_lang ) throws SQLException
(c) Arguments
- String encode_lang
- Specifies the name of the conversion character set. You must select a name from the list of encodings shown under Internationalization in the JavaTM 2 SDK, Standard Edition documentation.
- The table below shows the HiRDB character encodings and the corresponding conversion character sets.
HiRDB character encoding
(character encoding set with pdntenv or pdsetup command) |
Conversion character set to be specified |
lang-c |
ISO8859_1 |
sjis |
SJIS or MS932# |
ujis |
EUC_JP |
utf-8 |
UTF-8 |
chinese |
EUC_CN |
chinese-gb18030 |
GB18030 |
- Note:
- If the specified conversion character set name is not in compliance with the applicable name shown in this table, the operation of the JDBC driver is not guaranteed.
- #
- The specification of SJIS or MS932 depends on the handling of Windows special characters in the application.
- When OFF is specified, the JDBC driver assumes that the applicable conversion character set name shown in this table was specified. If the HiRDB character encoding is sjis, the conversion character set determined by the OS running the JDBC driver is as follows.
- In UNIX: SJIS
- In Windows: MS932
- If the null value is specified, the current conversion character set name that had been set by this method is invalidated, and the setting is returned to its initial status.
- Note that the specification values are case sensitive (except for OFF).
(d) Return value
None.
(e) Functional detail
The conversion character set that was specified by this method is used for carrying out the following data conversions:
- Conversion to character data (Unicode) when the application uses String to get data that was retrieved from HiRDB
- Conversion to binary data when the application uses String to set a value in HiRDB
If this method is not specified, the JDBC driver converts characters using the applicable conversion character set shown in the table above. However, the JDBC driver uses the default character conversion set of the Java Virtual Machine to convert the following items:
- Specification value of setUapName
- Authorization identifier and password (values specified by setUser, setPassword, and getConnection)
- Specification values of client environment definitions specified by setEnvironmentVariables
- Specification values of environment variables specified by the environment variable group name of the HiRDB client
(f) Exceptions
If the specified conversion character set is not supported by the Java Virtual Machine, this method throws an SQLException.
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.