Oracle7 Server Utilities

Contents Index Home Previous Next

NLS Considerations

This section describes behavior of Export and Import with respect to National Language Support (NLS).

Character Set Translation

Export writes export files using the character set specified for the user session; for example, 7-bit ASCII or IBM Code Page 500 (EBCDIC). If necessary, Import translates the data to the character set of its host system. Import converts character data to the user-session character set if that character set is different from the one in the Export file.

The export file identifies the character encoding scheme used for the character data in the file. If that character set is any single-byte character set (for example, EBCDIC or USASCII7), and if the character set used by the target database is also a single-byte character set, then the data is automatically converted to the character encoding scheme specified for the user session during import, as specified by the NLS_LANG parameter. After the data has been converted to the session character set, it is then converted to the database character set.

During the conversion, any characters in the export file that have no equivalent in the target character set are replaced with a default character. (The default character is defined by the target character set.) To guarantee 100% conversion, the target character set should be a superset or equivalent of the source character set.

For multi-byte character sets, conversion is only performed if the length of the character string cannot change as a result of the conversion.

For more information, refer to the National Language Support section of the Oracle7 Server Reference.

Export/Import and Single-Byte Character Sets

Some eight-bit characters can be "dropped" when importing an eight-bit character set export file. This occurs if the client machine has a native seven-bit character set, or the NLS_LANG operating system environment parameter is set to a seven-bit character set. "dropped" implies that some eight-bit characters are converted to seven-bit equivalents. Typically, accented European characters lose their accent mark.

This situation occurs because the eight-bit characters in the export file are converted to seven-bit characters via the client application. When sent to the database, the seven-bit characters are converted by the server into eight-bit characters. To avoid this situation, it is necessary to turn off one of these conversions. One possibility is to set NLS_LANG to the character set of the export file data.

When importing an Oracle version 6 export file with a character set different from that of the native operating system or the setting for NLS_LANG, you need to set the CHARSET import parameter to indicate the character set of the export file data. The CHARSET parameter is described [*].

Export/Import and Multi-Byte Character Sets

An export file that is produced with a multi-byte character set (for example, Chinese or Japanese) must be imported on a system that has a character set with the same character length. That is, the export character set and the import character set must have a 1:1 ratio.


Contents Index Home Previous Next