Support for Unicode in Oracle Database
Oracle Database began supporting Unicode as a database character set in release 7. Table 6-1 summarizes the Unicode character sets supported by Oracle Database.
Table 6-1 Unicode Character Sets Supported by Oracle Database
Table A-1 Oracle Database Supported Languages
Language Name | Language Abbreviation | Default Sort |
---|
SIMPLIFIED CHINESE | zhs | binary |
Table A-4 Recommended ASCII Database Character Sets
Name | Description | Comments | |
---|---|---|---|
Asian | |||
JA16EUC | EUC 24-bit Japanese | MB, ASCII | |
JA16EUCTILDE | The same as JA16EUC except for the way that the wave dash and the tilde are mapped to and from Unicode. | MB, ASCII | |
JA16SJIS | Shift-JIS 16-bit Japanese | MB, ASCII, UDC | |
JA16SJISTILDE | The same as JA16SJIS except for the way that the wave dash and the tilde are mapped to and from Unicode. | MB, ASCII, UDC | |
KO16MSWIN949 | MS Windows Code Page 949 Korean | MB, ASCII, UDC | |
TH8TISASCII | Thai Industrial Standard 620-2533 - ASCII 8-bit | SB, ASCII, EURO | |
VN8MSWIN1258 | MS Windows Code Page 1258 8-bit Vietnamese | SB, ASCII, EURO | |
ZHS16GBK | GBK 16-bit Simplified Chinese | MB, ASCII, UDC | |
ZHT16HKSCS | MS Windows Code Page 950 with Hong Kong Supplementary Character Set HKSCS-2001 (character set conversion to and from Unicode is based on Unicode 3.0) | MB, ASCII, EURO | |
ZHT16MSWIN950 | MS Windows Code Page 950 Traditional Chinese | MB, ASCII, UDC | |
ZHT32EUC | EUC 32-bit Traditional Chinese |
Universal | |||
AL32UTF8 | Unicode 5.0 UTF-8 Universal character set |
Setting NLS Parameters
NLS (National Language Support) parameters determine the locale-specific behavior on both the client and the server. NLS parameters can be specified in the following ways:
-
As initialization parameters on the server
You can include parameters in the initialization parameter file to specify a default session NLS environment. These settings have no effect on the client side; they control only the server's behavior. For example:
NLS_TERRITORY = "CZECH REPUBLIC"
-
As environment variables on the client
You can use NLS environment variables, which may be platform-dependent, to specify locale-dependent behavior for the client and also to override the default values set for the session in the initialization parameter file. For example, on a UNIX system:
% setenv NLS_SORT FRENCH
-
With the
ALTER SESSION
statementYou can use NLS parameters that are set in an
ALTER
SESSION
statement to override the default values that are set for the session in the initialization parameter file or set by the client with environment variables.ALTER SESSION SET NLS_SORT = FRENCH;
-
In SQL functions
You can use NLS parameters explicitly to hardcode NLS behavior within a SQL function. This practice overrides the default values that are set for the session in the initialization parameter file, set for the client with environment variables, or set for the session by the
ALTER
SESSION
statement. For example:TO_CHAR(hiredate, 'DD/MON/YYYY', 'nls_date_language = FRENCH')
See Also:
Oracle Database SQL Reference for more information about SQL functions, including theTO_CHAR
function
Table 3-1 shows the precedence order of the different methods of setting NLS parameters. Higher priority settings override lower priority settings. For example, a default value has the lowest priority and can be overridden by any other method.
Table 3-1 Methods of Setting NLS Parameters and Their Priorities
Priority | Method |
---|---|
1 (highest) | Explicitly set in SQL functions |
2 | Set by an |
3 | Set as an environment variable |
4 | Specified in the initialization parameter file |
5 | Default |
Table 3-2 lists the available NLS parameters. Because the SQL function NLS parameters can be specified only with specific functions, the table does not show the SQL function scope.
Table 3-2 NLS Parameters
Parameter | Description | Default | Scope:I = Initialization Parameter File E = Environment Variable A = ALTER SESSION |
---|---|---|---|
Calendar system | Gregorian | I, E, A | |
SQL, PL/SQL operator comparison |
| I, E, A | |
Credit accounting symbol | Derived from | E | |
Local currency symbol | Derived from | I, E, A | |
Date format | Derived from | I, E, A | |
Language for day and month names | Derived from | I, E, A | |
Debit accounting symbol | Derived from | E | |
ISO international currency symbol | Derived from | I, E, A | |
See Also: "Choosing a Locale with the NLS_LANG Environment Variable" | Language, territory, character set |
| E |
Language | Derived from | I, A | |
How strings are treated |
| I, E, A | |
Character that separates items in a list | Derived from | E | |
Monetary symbol for dollar and cents (or their equivalents) | Derived from | E | |
Reports data loss during a character type conversion |
| I, A | |
Decimal character and group separator | Derived from | I, E, A | |
Character sort sequence | Derived from | I, E, A | |
Territory | Derived from | I, A | |
Timestamp | Derived from | I, E, A | |
Timestamp with time zone | Derived from | I, E, A | |
Dual currency symbol | Derived from | I, E, A |