Contents IndexSupport for multibyte character sets Creating custom collations

User's Guide
   Part III. Using SQL Anywhere
     Chapter 22. Database Collations
      Choosing a character set

The best collation to use varies depending primarily on the language of the user and the code pages available in the user's machine. This will, of course, vary from one country or region to another.

The following table shows the built-in collations provided with SQL Anywhere. The table and the corresponding collations were derived from several manuals from IBM concerning National Language Support, subject to the restrictions mentioned above. (This table represents the best information available at the time of writing. Due to recent rapid geopolitical changes, the table may contain names for countries that no longer exist.)

Country Language Primary Code Page Primary Collation Secondary Code Page Secondary Collation
Argentina Spanish 850 850ESP 437 437ESP
Australia English 437 437LATIN1 850 850LATIN1
Austria German 850 850LATIN1 437 437LATIN1
Belgium Belgian Dutch 850 850LATIN1 437 437LATIN1
Belgium Belgian French 850 850LATIN1 437 437LATIN1
Belarus Belarussian 855 855CYR    
Brazil Portuguese 850 850LATIN1 437 437LATIN1
Bulgaria Bulgarian 855 855CYR 850 850CYR
Canada Cdn French 850 850LATIN1 863 863LATIN1
Canada English 437 437LATIN1 850 850LATIN1
Croatia Croatian 852 852LATIN2 850 850LATIN2
Czech Republic Czech 852 852LATIN2 850 850LATIN2
Denmark Danish 850 850DAN    
Finland Finnish 850 850SVE 437 437SVE
France French 850 850LATIN1 437 437LATIN1
Germany German 850 850LATIN1 437 437LATIN1
Greece Greek 869 869ELL 850 850ELL
Hungary Hungarian 852 852LATIN2 850 850LATIN2
Iceland Icelandic 850 850ISL 861 861ISL
Ireland English 850 850LATIN1 437 437LATIN1
Israel Hebrew 862 862HEB 856 856HEB
Italy Italian 850 850LATIN1 437 437LATIN1
Mexico Spanish 850 850ESP 437 437ESP
Nether-lands Dutch 850 850LATIN1 437 437LATIN1
New Zealand English 437 437LATIN1 850 850LATIN1
Norway Norwegian 865 865NOR 850 850NOR
Peru Spanish 850 850ESP 437 437ESP
Poland Polish 852 852LATIN2 850 850LATIN2
Portugal Portuguese 850 850LATIN1 860 860LATIN1
Romania Romanian 852 852LATIN2 850 850LATIN2
Russia Russian 866 866RUS 850 850RUS
S. Africa Afrikaans 437 437LATIN1 850 850LATIN1
S. Africa English 437 437LATIN1 850 850LATIN1
Slovak Republic Slovakian 852 852LATIN2 850 850LATIN2
Slovenia Slovenian 852 852LATIN2 850 850LATIN2
Spain Spanish 850 850ESP 437 437ESP
Sweden Swedish 850 850SVE 437 437SVE
Switzer-land French 850 850LATIN1 437 437LATIN1
Switzer-land German 850 850LATIN1 437 437LATIN1
Switzer-land Italian 850 850LATIN1 437 437LATIN1
Turkey Turkish 857 857TRK 850 850TRK
UK English 850 850LATIN1 437 437LATIN1
USA English 437 437LATIN1 850 850LATIN1
Venezuela Spanish 850 850ESP 437 437ESP
Yugoslavia Maced-onian 852 852LATIN2 850 850LATIN2
Yugoslavia Serbian Cyrillic 855 855CYR 852 852CYR
Yugoslavia Serbian Latin 852 852LATIN2 850 850LATIN2

When creating a new database

A user creating a new database should find the line with the country/language that they wish to use, then pick either the primary or secondary collation, depending on which code page is in use in their computer. (The chcp command will display the current code page number.) If their particular combination is not present, then another line with a satisfactory combination may be used, or a custom collation may be required.

Top of page


International aspects of case sensitivity

SQL Anywhere is case preserving and case insensitive for identifiers, such as table names and column names. The names are stored in the case that they are created in, but any access to the identifiers is done in a case-insensitive manner.

For example, the names of the SQL Anywhere system tables are held in upper case (SYSDOMAIN, SYSTABLE, and so on), but access is case insensitive, so that the two following statements are generally equivalent:

     SELECT *
     FROM systable
     SELECT *
     FROM SYSTABLE

The equivalence of upper and lower case characters is enforced in the collation. There are some collations where particular care may be needed when assuming case insensitivity of identifiers.

Example

In the Turkish 857TRK collation, the lower case i does not have the character I as its upper case equivalent. Therefore, despite the case insensitivity of identifiers, the following two statements are not equivalent in this collation:

     SELECT *
     FROM sysdomain
     SELECT *
     FROM SYSDOMAIN

Top of page


Contents IndexSupport for multibyte character sets Creating custom collations