Character literals

In versions of Adaptive Server earlier than 12.5.1, when the client’s character set was different from the server’s character set, conversions were generally enabled to allow the text of SQL queries to be converted to the server’s character set before being processed. If any character could not be converted because it could not be represented in the server’s character set, the entire query was rejected. This character set “bottleneck” has been removed as of Adaptive Server version 12.5.1.

You cannot declare the datatype of a character literal. Adaptive Server treats character literals as varchar, except those that contain characters that cannot be converted to the server’s default character set. Such literals are treated as univarchar. This makes it possible to perform such queries as selecting unichar data in a server configured for “iso_1” using a “sjis” (Japanese) client. For example:

Example of how Japanese text appears.

Since the character literal cannot be represented using the char datatype (in “iso_1”), it is promoted to the unichar datatype, and the query succeeds.