Home  >  Article  >  Database  >  Linux环境Oracle显示乱码的解决方法

Linux环境Oracle显示乱码的解决方法

WBOY
WBOYOriginal
2016-06-07 17:23:52982browse

Linux环境Oracle所有出现汉字的地方,都以?替代,或者是直接乱码。有时候报错提示也出现乱码。

故障现象:

Linux环境Oracle所有出现汉字的地方,都以?替代,或者是直接乱码。有时候报错提示也出现乱码。

解决方法:

一、临时解决方法

切换到Oracle用户,执行[sql] view plaincopyprint?

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK问题解决。但这种方式只对本次会话有效。

二、永久解决方法

修改profile文件:[cpp] view plaincopyprint?

vi /etc/profile

vi /etc/profile在文件最后添加[cpp] view plaincopyprint?

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK问题解决!而且退出后,,下次登录不用重新设置。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn