15.1.3 About conversion of character encoding
- Organization of this subsection
(1) Character encoding conversion processing
The ODBC driver provided by HADB supports ODBC 3.5 that includes the MS-Unicode interfaces.
When an SQLxxxW function, which is an MS-Unicode interface, is used, the ODBC driver performs conversion between the MS-Unicode character string data and the character encodings supported by HADB.
The following figure shows how the ODBC driver performs conversion between MS-Unicode character string data and the character encodings supported by HADB.
- Explanation:
-
-
When the character encoding is converted from an application program to the HADB server for processing, the ODBC driver uses an SQLxxxW function to convert MS-Unicode character string data to an HADB-supported character encoding, and then passes the processing to the HADB server.
-
When the character encoding is converted from the HADB server to an application program for processing, the ODBC driver uses an SQLxxxW function to convert the HADB-supported character encoding to MS-Unicode character string data, and then outputs the results to the application program.
-
HADB supports the following character encodings:
-
Unicode (UTF-8)
-
Shift-JIS
(2) Notes
-
Characters with a diacritical mark
If a character with a diacritical mark, such as an umlaut () or a dieresis (), is compared, assigned to a variable, or retrieved, the character might be treated as not having the diacritical mark.
This is because diacritical marks are lost when the character encoding is converted by using an SQLxxxW function.
-
Characters such as surrogate pairs that do not support conversion of character encoding
When you use a SQLxxxW function of the ODBC 3.5 interface, character encoding will be converted. An error occurs if a character such as a surrogate pair whose character encoding cannot be converted is compared or undergoes storage assignment. Characters of this nature might be replaced with # during retrieval, and characters that appear after this # in the retrieval results might become garbled.