Oracle beginner's note (2) solutions to Chinese Character garbled characters on Oracle 9i or above clients connected to Oracle 8i and servers earlier than 8i

Source: Internet
Author: User

When a client of Oracle 9i or later is connected to a server of Oracle 8i or later versions, all the Chinese data queried becomes garbled. The query finally solved the garbled problem.

The development tool is ASP. NET (C #) + Oracle, using system. Data. oracleclient to connect to the Oracle database.

Solution 1 (the first item can be left blank, but make sure that the server side is the same as the client Character Set ):

1. Enter the SQL plus input command: Select userenv ('language') from dual; the query Character Set result is

Simplified chinese_china.zhs16gbk.

2.

Start-run-type regedit to enter the registry, just in case, first back up the registry, then find the HKEY_LOCAL_MACHINE-SOFTWARE-ORCALE, you can see the name of the nls_lang item, change its data (key value) to: Simplified chinese_china.zhs16gbk

3.

In the Oracle directory, if there is a homeo item in other sub-directories, click homeo, you can also see the nls_lang item and delete it. If there are homeo1 and other items, the following nls_lang items will be deleted.

4. Disable the registry.

5. Check whether garbled characters are resolved in the test result of running the program.

6. Note: you can disable the 1st items first. Make sure that the character set of the client and server is the same.

 

Solution 2: Connect using system. Data. oledb to avoid Chinese garbled characters.

Related Article

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.