Both application and server locale definitions have a character set. The application uses its character set when requesting character strings from the database server. The database server compares the database character set with that of the application to determine whether character set conversion is needed. If the database server cannot convert to and from the client character set, the connection fails.
If the SACHARSET environment variable is set, its value is used to determine the character set.
The database server uses SACHARSET only when creating new databases, and then only if no collation is specified.
If the connection string specifies a character set, it is used. See CharSet (CS) connection parameter.
Sybase Open Client applications check the locales.dat file in the locales subdirectory of the Sybase release directory.
Character set information from the operating system is used to determine the locale:
On Windows operating systems, the current Windows ANSI code page is used.
On Unix platforms, the following Locale Environment Variables are examined, in the specified order: LC_ALL, LC_MESSAGES, LC_CTYPE, LANG. For the first of these environment variables found to be set, its value is used to determine the character set. If the character set cannot be determined from the operating system, the default of iso_1 (also referred to as Windows code page 28591, ISO 8859-1 Latin I, ISO 8859-1 Latin-1, or iso_8859-1:1987) is used.
On any other platform, a default code page cp1252 is used.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|