[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