When you configure your server, you are asked to specify a default character set for the server. The default character set is the character set in which the server stores and manipulates data. Each server can have only one default character set.
By default, the installation tool assumes that the native character set of the platform operating system is the server’s default character set. However, you can select any character set supported by Adaptive Server as the default on your server (see Table 7-1).
For example, if you are installing the server on IBM RS/6000 running AIX, and you select one of the Western European languages to install, the installation tool assumes the default character set to be ISO 8859-1.
If you are installing a Unicode server, select UTF–8 as your default character set.
For non-Unicode servers, determine what platform most of your client systems use and use the character set for this platform as the default character set on the server.
This has two advantages:
The number of unmappable characters between character sets is minimized.
Since there is usually not a complete one-to-one mapping between the characters in two character sets, there is a potential for some data loss. This is usually minor because most nonconverted characters are special symbols that are not commonly used or are specific to a platform.
This minimizes the character set conversion that is required.
When the character set on the client system differs from the default character set on the server, data must be converted in order to ensure data integrity. Although the measured performance decrease that results from character set conversion is insignificant, it is good practice to select the default character set that results in the fewest conversions.
For example, if most of your clients use CP850, specify CP850 on your server. You can do this even if your server is on an HP-UX system (where its native character set for the Group 1 languages is ROMAN8).
Sybase strongly recommends that you decide which character set you want to use as your default before you create any databases or make any changes to the Sybase-supplied databases.
In the example below in Figure 7-2, 175 clients all access the same Adaptive Server. The clients are on different platforms and use different character sets. The critical factor that allows these clients to function together is that all of the character sets in the client/server system belong to the same language group (see Table 7-1). Notice that the default language for the Adaptive Server is CP 850, which is the character set used by the largest number of clients. This allows the server to operate most efficiently, with the least amount of character set conversion.
Figure 7-2: Clients using different character sets in the same language group
To help you choose the default character set for your server, the following tables list the most commonly used character sets by platform and language.
Platform |
Language |
Character set |
---|---|---|
Win 95, 98 |
U.S. English, Western Europe |
CP 1252 |
Win NT 4.0 |
U.S. English, Western Europe |
CP 1252 |
Win 2000 |
U.S. English, Western Europe |
CP 1252 |
Sun Solaris |
U.S. English, Western Europe |
ISO 8859-1 |
HP-UX 10,11 |
U.S. English, Western Europe |
ISO 8859-1 |
IBM AIX 4.x |
U.S. English, Western Europe |
ISO 8859-1 |
Platform |
Language |
Character set |
---|---|---|
Win 95, 98 |
Japanese |
CP 932 for Windows |
Win NT 4.0 |
Japanese |
CP 932 for Windows |
Win 2000 |
Japanese |
CP 932 for Windows |
Sun Solaris |
Japanese |
EUC-JIS |
HP-UX 10,11 |
Japanese |
EUC-JIS |
IBM AIX 4.x |
Japanese |
EUC-JIS |
Platform |
Language |
Character set |
---|---|---|
Win 95, 98 |
Chinese (simplified) |
CP 936 for Windows |
Win NT 4.0 |
Chinese (simplified) |
CP 936 for Windows |
Win 2000 |
Chinese (simplified) |
CP 936 for Windows |
Sun Solaris |
Chinese (simplified) |
EUC-GB |
HP-UX 10,11 |
Chinese (simplified) |
EUC-GBS |
IBM AIX 4.x |
Chinese (simplified) |
EUC-GB |