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.