In SAP Adaptive Server version 12.5 and later, database clients can take advantage of the unichar and univarchar datatypes
The two datatypes allow for the efficient storage and retrieval of Unicode data, allowing users to designate database table columns to store Unicode data, regardless of the default character set of the server.
Quoting from the Unicode Standard, version 2.0:
The Unicode Standard is a fixed-width, uniform encoding scheme for encoding characters and text. The repertoire of this international character code for information processing includes characters for the major scripts of the world, as well as technical symbols in common. The Unicode character encoding treats alphabetic characters, ideographic characters, and symbols identically, which means they can be used in any mixture and with equal facility. The Unicode Standard is modeled on the ASCII character set, but uses a 16-bit encoding to support full multilingual text.
For all character data that a client sends to the server—for example, using PreparedStatement.setString (int column, String value)— SAP jConnect determines if the string can be converted to the default character set of the server.
If SAP jConnect determines that the characters cannot be converted to the character set of the server (for example, some characters cannot be represented), it sends the data to the server encoded as unichar/univarchar data.
For example, if a client attempts to send a Unicode Japanese character to an SAP Adaptive Server 12.5.1 that has iso_1 as the default character set, SAP jConnect detects that the Japanese character cannot be converted to an iso_1 character. SAP jConnect then sends the string as Unicode data.
There is a performance penalty when a client sends unichar/univarchar data to a server, because SAP jConnect must perform character-to-byte conversion twice for all strings and characters that do not map directly to the default character set of the server.
If you are using a SAP jConnect version that is earlier than 6.05 and you want to use the unichar and univarchar datatypes, you must: