SQL Anywhere supports a growing list of hundreds of character sets and labels. Character set encodings are known by a wide variety of names or labels. To view the list of character sets supported by SQL Anywhere, execute the following command at a command prompt:
Each line of output lists a number of comma-separated alternate labels for a given character set encoding. The first label in each line of output is the preferred SQL Anywhere name for the character set encoding. The others are the labels used by different authorities, organizations, or standards. These are IANA (Internet Assigned Numbers Authority), MIME (Multipurpose Internet Mail Extensions), ICU (International Components for Unicode), JAVA, and ASE (Adaptive Server Enterprise).
If you do not find the character set you are looking for, you can also execute the following command to see a longer list that includes character sets that are not commonly used or known:
When a character set encoding label is specified, SQL Anywhere searches for the label in the set of labels known to it. Different authorities sometimes use the same label for different character sets. SQL Anywhere does its best to resolve ambiguities by context. For example, a JDBC application that references a character set by an ambiguous label will resolve to a JAVA standard label. It is recommended that the SQL Anywhere label always be used to avoid any ambiguities. An excellent resource for understanding character set encoding labels is International Components for Unicode.
Another way to determine if a certain character set or label is supported is to test it using the CSCONVERT function. The CSCONVERT function can convert a string from the database character set into the specified character set or label. If the character set or label is not supported, the database server returns an error. If the character set or label is supported, the database server returns a result set.
For example, to determine if the cp850 character set is supported, execute the following command in Interactive SQL:
SELECT CSCONVERT ( 'teststring', 'cp850' );
The database server returns a result value; this indicates that cp850 is supported.
For more information about using the CSCONVERT function, see CSCONVERT function [String].
A wide variety of additional character set encoding labels are recognized by SQL Anywhere. These are labels that are not standard labels for any of SQL Anywhere, IANA, MIME, ICU, JAVA, or ASE. To see the full list of supported character set encoding labels, execute the following command at a command prompt:
Each line of output lists the entire set of alternate labels for a given character set encoding. The first label in each line of output is the preferred SQL Anywhere name for the character set encoding.