Problem Description:
When using the JDBC to insert Chinese data, data with Plsqldev query, the normal display of Chinese, but with Sqlplus query, for Chinese garbled, when using Plsqldev directly inserted in Chinese, also directly garbled, with Sqlplus inserted in the Chinese, Plsqldev read out garbled---> Plsqldev and sqlplus garbled inconsistent situation
Solve:
1) Using Query statements
| 1 |
select* fromv$nls_parameters; |
Query to the
| 1 |
NLS_CHARACTERSET AL32UTF8 --主要是看这个编码 |
Online resolution One, modify the registry
| 123 |
路径:regedit>>HKEY_LOCL_MACHINE>>SOFTWARE>>ORALCE>>KEY_ORADB11G_HOME1NLS_LANG的值设置为SIMPLIFIED CHINESE_CHINA.ZHS16GBK --主要是修改后边的字符编码即可 |
Question: The database is clearly AL32UTF8 encoding, the client why modified to GBK encoding to display properly. Probably the resources of the database, when the console display will have a default transcoding, set to GBK to display properly ... This solution can only solve the sqlplus garbled, and can not solve the plsqldev garbled, it is possible that I installed a 64-bit database, and installed a 32-bit client, Plsqldev is dependent on 32 bits, so the changes to Plsqldev no impact
Online workaround Two, modify environment variables
| 12 |
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK--加入一个系统环境变量 |
In this way, Plsqldev and Sqlplus read the system environment variables, if there is a Nls_lang variable, you do not need to read the registry.
Final Solution
Select method Two, modify the environment variables directly, do not need to modify the registry, both will work
Turn: Oracle database Sqlplus and Plsqldev address garbled