Release Notes


8.3 Appendix E. National Language Support (NLS)

8.3.1 Country/Region Code and Code Page Support

In the table of Supported Languages and Code Sets, code page 5488 is also known as GB 18030, and code page 1394 is also known as ShiftJIS X0213.

Connection of a UTF-8 (code page 1208) client to a non-Unicode database is not supported.

8.3.2 Import/Export/Load Considerations -- Restrictions for Code Pages 1394 and 5488

Data in code pages 1394 (ShiftJIS X0213) and 5488 (GB 18030) can be moved into a Unicode database using the load or import utilities. The export utility can be used to move data from a Unicode database to a data file in code pages 1394 and 5488.

Only connections between a Unicode client and a Unicode server are supported, so you need to use either a Unicode client or set the DB2 registry variable DB2CODEPAGE to 1208 prior to using the load, import, or export utilities.

Conversion from code page 1394 or 5488 to Unicode may result in expansion. For example, a 2-byte character may be stored as two 16-bit Unicode characters in the GRAPHIC columns. You need to ensure the target columns in the Unicode database are wide enough to contain any expanded Unicode byte.

8.3.3 Datetime Values

8.3.3.1 String Representations of Datetime Values

Values whose data types are DATE, TIME, or TIMESTAMP are represented in an internal form that is transparent to the SQL user. Dates, times, and time stamps can also, however, be represented by strings, and these representations directly concern the SQL user because there are no constants or variables whose data types are DATE, TIME, or TIMESTAMP. Thus, to be retrieved, a datetime value must be assigned to a string variable. The string representation is normally the default format of datetime values associated with the country/region code of the client, unless overridden by specification of the DATETIME format option when the program is precompiled or bound to the database.

When a valid string representation of a datetime value is used in an operation with an internal datetime value, the string representation is converted to the internal form of the date, time, or time stamp before the operation is performed. Valid string representations of datetime values are defined in the following sections.

Note:
Graphic string representations of datetime values are supported only in Unicode databases.

8.3.3.2 Date Strings

A string representation of a date is a string that starts with a digit and has a length of at least 8 characters. Trailing blanks may be included; leading zeros may be omitted from the month part and the day part of the date.

The table "Formats for String Representations of Dates" remains unchanged.

8.3.3.3 Time Strings

A string representation of a time is a string that starts with a digit and has a length of at least 4 characters. Trailing blanks may be included; a leading zero may be omitted from the hour part of the time, and seconds may be omitted entirely. If you choose to omit seconds, an implicit specification of 0 seconds is assumed. Thus, 13:30 is equivalent to 13:30:00.

The table "Formats for String Representations of Times" remains unchanged.

8.3.3.4 Time Stamp Strings

A string representation of a time stamp is a string that starts with a digit and has a length of at least 16 characters. The complete string representation of a time stamp has the form yyyy-mm-dd-hh.mm.ss.nnnnnn. Trailing blanks may be included; leading zeros may be omitted from the month, day, or hour part of the time stamp, and microseconds may be truncated or omitted entirely. If you choose to omit any digit of the microseconds part, an implicit specification of 0 is assumed. Thus, 1991-3-2-8.30.00 is equivalent to 1991-03-02-08.30.00.000000.

8.3.3.5 Character Set Considerations

Date and time stamp strings must contain only digits and delimiter symbols.

8.3.3.6 Date and Time Formats

The string representation of date and time formats is the default format of datetime values associated with the country/region code of the application. This default format can be overridden by specifying the DATETIME format option when the program is precompiled or bound to the database.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]