linux下使用oracle 11g sqlplus信息显示乱码

[oracle@slave ~]$ cat /etc/sysconfig/i18n 
LANG="zh_CN.UTF-8"
[oracle@slave ~]$ echo $LANG
zh_CN.UTF-8
[oracle@slave ~]$ echo $NLS_LANG

[oracle@slave ~]$ sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on Sat Oct 30 13:24:10 2010

Copyright (c) 1982, 2007, Oracle. All rights reserved.

SQL> conn /as sysdba

SQL> select * from olap.tb_test_1;

????
? Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options ??

如下设置一下就可以正常显示了:
[oracle@slave ~]$ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
[oracle@slave ~]$ sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on 星期六 10月 30 13:22:12 2010

Copyright (c) 1982, 2007, Oracle. All rights reserved.

SQL> conn /as sysdba
已连接。

数据库字符集是AL32UTF8

加入profile文件下次好直接生效:
[oracle@slave ~]$ vim ~/.bash_profile 
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

[oracle@slave ~]$ source ~/.bash_profile 

但是其它命令又乱码了:
[oracle@slave ~]$ /etc/init.d/vsftpd status
vsftpd 宸叉 锛屼絾鏄?subsys 琚 攣
最后改成如下:
[oracle@slave ~]$ echo $LANG
en_US.UTF-8
[oracle@slave ~]$ echo $LC_ALL
en_US.UTF-8
[oracle@slave ~]$ echo $NLS_LANG
SIMPLIFIED CHINESE_CHINA.AL32UTF8
[oracle@slave ~]$ /etc/init.d/vsftpd status
vsftpd dead but subsys locked
[oracle@slave ~]$ sqlplus /nolog

SQL> conn /as sysdba
SQL> select * from olap.tb_test_1;

SQL> quit

linux下使用oracle 11g sqlplus信息显示乱码

上一篇:AcWING 799. 最长连续不重复子序列


下一篇:Spring Cloud Apollo 实践