About test reports for character sets

Source: Internet
Author: User
Tags character set contains empty client

Nls_lang is used to set the character set for the client. The language that affects the Sqlplus interface.

Regedit
HKEY_LOCAL_MACHINE OFTWARE\ORACLE\HOME0
Nls_lang Key value
1, take the value of ' us7ascii ' or empty
2, take the value of ' simplified Chinese_china. ZHS16GBK '

Nls_characterset is used to set the database internal character set and determine the format in which data records are saved.
1, take the value of ' us7ascii ' or empty
2, take the value of ' ZHS16GBK '

Test: Environment (there is already a table for Test_char. Contains Chinese characters)
1> client, server-side character set is ZHS16GBK:
. can display Test_char correctly.
. can correctly establish the table containing Chinese character records.
. import Xiejia.test_char into mode test
Exported ZHS16GBK character set and Al16utf16 NCHAR character set

The 2> client is ZHS16GBK, and the internal character set of the server is Us7ascii
. Unable to display Test_char correctly
The content cannot be displayed correctly after a table with a Chinese character record is established
. In the execution of the export process.
Exported ZHS16GBK character set and Al16utf16 NCHAR character set
Server uses the US7ASCII character set (possible character set conversion)

The 3> client is US7ASCII, and the internal character set of the server is us7asii
. can display Test_char normally
. You cannot display the contents of a table that contains a Chinese character record after it is established
. In the process of performing export
Export done in Us7ascii character set and Al16utf16 NCHAR character set
Import content cannot be displayed normally after the import process is executed

The 4> client is ZHS16GBK, and the internal character set of the server is Us7ascii
. Test_char not displayed properly
. You cannot display the contents of a table that contains a Chinese character record after it is established
. In the process of performing export
Export done in Us7ascii character set and Al16utf16 NCHAR character set
Server uses ZHS16GBK character set (possible charset conversion)

Summarize:
The client's settings Uls_lang determine the character set to be exported.

In the Oracle9i database, the client character set must be the same as the database core character set, otherwise the characters appear garbled

Related tables:
V$nls_parameters
Nls_database_parameters
props$

Retention issues:
If the client is US7ASCII with the service-side character set, a table with Chinese characters cannot be displayed correctly. Would it be because Us7ascii doesn't support Chinese characters?



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.