Linux下Oracle客户端中文乱码问题

感谢这篇文章:http://liushuai-238.iteye.com/blog/362610

1、获得服务器上的字符集
首先登录上sqlplus,查看服务器上的字符集。

sqlplus user/pass@ip/sid
#得到如下结果:
SQL> select userenv('language') from dual;  

USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.AL32UTF8

2、设置本地bashrc
设置本地字符集变量为上面得到的那个!

vim ~/.bashrc
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Leave a Reply

Your email address will not be published. Required fields are marked *