Internationalization refers to the ability of software to handle a variety of languages and their appropriate characters sets, independently of the language in which the software is running, or the operating system on which the software is running. SQL Anywhere has full internationalization capabilities. The following features discuss the most commonly requested and used capabilities.
Unicode support SQL Anywhere supports Unicode as follows:
Client support for UTF-16 in SQL Anywhere client libraries for ODBC, OLE DB, ADO.NET, and JDBC
NCHAR data types for storing Unicode character data in UTF-8
CHAR data types can use UTF-8 encoding
Code pages and character sets The SQL Anywhere database server and related tools support Windows (ANSI/ISO), UTF-8, and Unix code pages and character sets.
Collations SQL Anywhere supports two collation algorithms: the SQL Anywhere Collation Algorithm (SACA), and the Unicode Collation Algorithm (UCA) using International Components for Unicode (ICU).
For more information about ICU, see What is ICU, and when is it needed?.
SACA provides fast, compact, and reasonable sorting at the expense of linguistic correctness. UCA provides linguistic correctness, but with a small expense in storage requirements and execution time. See Understanding collations.
For advanced ordering and comparison capabilities, SQL Anywhere also provides the SORTKEY and COMPARE functions. These functions provide advanced linguistic sorting capabilities, like the ordering found in a dictionary or telephone book. Where appropriate, case-insensitive and accent-insensitive ordering and comparisons are provided. See SORTKEY function [String], and COMPARE function [String].
SQL Anywhere also contains design features allowing for automatic use of SORTKEY-based ordering on character columns. The sort_collation database option specifies the sort ordering to be used when an ORDER BY is specified for a character column. Computed columns may also be used to store sort keys for character columns so that they do not need to be computed each time that an ORDER BY is specified. See sort_collation option [database].
Character set conversion SQL Anywhere converts data between the character set encoding on your server and client systems, thus maintaining the integrity of your data, even in mixed character set environments. See Character set conversion.
Identifiers SQL Anywhere supports the use of identifiers containing most single-byte and multibyte characters without requiring quotes. Exceptions are generally limited to spaces and punctuation symbols.
Currency Currency symbols, including the euro symbol, are supported for ordering. SQL Anywhere provides no currency formatting support.
Date and time formats SQL Anywhere supports the Gregorian calendar, and provides a variety of formats for date and time strings. Custom formatting can be done using the date_format, time_format, and timestamp_format database options. The date_format and timestamp_format options default to an ISO-compatible format for the date, YYYY-MM-DD. SQL Anywhere provides the CONVERT function, which provides output formatting of dates and times into a variety of popular formats.
What is ICU, and when is it needed?