Oracle插入中文出现乱码
环境:solaris 10
数据库:oracle 10g
客户端:PL/SQL Developer(Windows)在solaris中用sqlplus update或insert时用中文,PL/SQL Developer(windows)出现乱码,
在PL/SQL Developer(windows)中insert或update时不会乱码。
环境:solaris 10
数据库:oracle 10g
客户端:PL/SQL Developer(Windows)在solaris中用sqlplus update或insert时用中文,PL/SQL Developer(windows)出现乱码,
在PL/SQL Developer(windows)中insert或update时不会乱码。
可以设置字符集如:export NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
设置成与数据库对应的字符集
[root@UNIXServer:/]#export NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
-bash: export: `CHINESE_CHINA.ZHS16GBK': not a valid identifier
要用双引号:export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
在solaris输入如下后,sqlplus插入中文,PL/SQL Developer(windows)还是乱码啊
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
select * from nls_database_parameters t where t.PARAMETER='NLS_CHARACTERSET';
------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET
ZHS16GBK
===========================
新建数据库时,有选择SIMPLIFIED CHINESE_CHINA.ZHS16GBK
在windows环境下insert或update不会乱码,在solaris环境下insert或update后, PL/SQL Developer(windows) 显示乱码。
不要在sqlplus 里用中文.
直接在plsql 里写查询,再运行.