Test report about character sets: nls_lang is used to set the character set of the client. Language that affects the sqlplus interface.
Regedit:
Hkey_local_machine/software/oracle/home0
Nls_lang key value
1. The value is 'us7ascii 'or null.
2. set the value to 'simplified chinese_china.zhs16gbk'
Nls_characterset is used to set the internal character set of the database and determine the format of data record storage.
1. The value is 'us7ascii 'or null.
2. set the value to 'zhs16gbk'
Test: environment (a table already exists as test_char. contains Chinese characters)
1> client. the server character set is ZHS16GBK:
. Test_char is displayed correctly.
. Tables containing Chinese character records can be correctly created.
. Import xiejia. test_char to the test mode.
The ZHS16GBK and AL16UTF16 NCHAR character sets have been exported.
2> the client is ZHS16GBK, and the internal character set of the server is US7ASCII.
. Test_char cannot be displayed normally.
The table containing Chinese character records cannot be displayed normally.
. During the execution of the export.
The ZHS16GBK and AL16UTF16 NCHAR character sets have been exported.
The server uses the US7ASCII character set (possible character set conversion)
3> the client is US7ASCII, and the internal character set of the server is US7ASII.
. Test_char is displayed normally.
The table containing Chinese character records cannot be displayed normally.
. During the execution of the export
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
After the import process is executed, the imported content cannot be displayed normally.
4> the client is ZHS16GBK, and the internal character set of the server is US7ASCII.
. Test_char cannot be displayed normally.
The table containing Chinese character records cannot be displayed normally.
. During the execution of the export
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
Server uses ZHS16GBK character set (possible charset conversion)
Summary:
The setting of uls_lang on the client determines the character set to be exported.
In the oracle9i Database, the client character set must be of the same type as the database core character set; otherwise, Chinese characters may be garbled.
Related tables:
V $ nls_parameters
Nls_database_parameters
Props $
Retention questions:
If the character set on the client and server are both US7ASCII, cannot a table containing Chinese characters be properly displayed? Is it because US7ASCII does not support Chinese characters?