Oracle-PLSQL Chinese garbled display is full of question marks

Source: Internet
Author: User


Problem


PLSQL and Oracle have just been configured in the past two days. However, when data is inserted in PLSQL, a problem occurs. The table in PLSQL cannot display Chinese characters, and Chinese characters cannot be saved or output, the question mark is displayed in the table,


 

 


Cause


After some verification, we found that the source of the problem was not on PLSQL, but on our Oracle, because the character set in our Oracle database does not support Chinese, now that we know the reason, we can easily configure our Oracle character set to support Chinese characters.

 


Solution


My Oracle version is 11g. The following uses my example to explain the setup process.

 

Step 1


Start-run-enter regedit-press enter to enter the Registry, and then click HKEY_LOCAL_MACHINE ---> SOFTWARE ---> ORACLE ---> KEY_OraDb11g_home1 (different versions of Oracle display different, but it will all contain the word "home". Locate "NLS_LANG" and check whether the value data is "SIMPLIFIED CHINESE_CHINA.ZHS16GBK". If not, set it to "SIMPLIFIED CHINESE_CHINA.ZHS16GBK."

 


 

 


Step 2


After the registry is set, set our environment variables, computer (right-click) ---> properties ---> advanced system settings ---> advanced ---> environment variables ---> new, we recommend that you create a new user variable with the variable name "NLS_LANG" and the variable value "SIMPLIFIEDCHINESE_CHINA.ZHS16GBK ". Click OK. At this point, the settings are complete.


 


Effect


Next let's take a look at our results, close PLSQL, and restart. Chinese has really appeared,


 

 


Postscript


Environment variables make it much easier for us to develop, but they are also the "source of all evil" of many problems, which makes us feel painful and happy.

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.