Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » Database configuration » International languages and character sets » Locales


Locale character set

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.

  1. 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.

  2. If the connection string specifies a character set, it is used. See CharSet (CS) connection parameter.

  3. Sybase Open Client applications check the locales.dat file in the locales subdirectory of the Sybase release directory.

  4. 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.

  5. On any other platform, a default code page cp1252 is used.

 See also