PL/SQL Developer 解决中文乱码问题

前 沿-能够根据语言环境展现不一样的符号 参考

NLS (National Language Support) is used to define national date, number, currency and language settings. For example, it can be used to change the currency symbol from $ to € (Euro); the language from English to Dutch, etc.sql

To see what NLS parameters are in effect, perform the below queries -windows

Client parameters (change with ALTER SESSION):服务器

SELECT * FROM nls_session_parameters;## 优先级最高

Instance parameters (change with ALTER SYSTEM):session

SELECT * FROM nls_instance_parameters;## 优先级第二高

Database parameters (set during database creation):测试

SELECT * FROM nls_database_parameters;

Note that session parameters take precedence over instance and database parameters. Instance parameters take precedence over database parameters.字体


1、查看当前用户客户端设置的语言环境 

参考了博文 编码


NLS_LANG格式:
NLS_LANG = language_territory.charset
有三个组成部分(语言、地域和字符集),每一个成分控制了NLS子集的特性。其中:language 指定服务器消息的语言。territory 指定服务器的日期和数字格式。charset 指定字符集。
spa


简单版本:首先,经过 code

select userenv('language') from dual;orm


GBK以下:

windows中建立一个名为“NLS_LANG”的系统环境变量,

设置其值为SIMPLIFIED CHINESE_CHINA.ZHS16GBK,而后从新启动 pl/sql developer,这样检索出来的中文内容就不会是乱码了。 通常状况下,设置NLS_LANG和区域语言以后就能够显示正常了。


2、检查服务器编码:

执行SQL语法:

SELECT * FROM nls_database_parameters;  

说明:#虽然个人 database设置的 America 可是它优先级没有咱们设置的NLS 高,因此会优先按照咱们所设置的中文显示。不必定非要和NLS设置的一致,不少博文都说必须一致,应该是不许确的。


3.从新链接sqlplus,查看数据:

显示正常.

4.PL/SQL Developer设置并从新链接:

pl/sql developer的菜单->tools->preferences->user interface->fonts 中修改成中文字体(实际测试不修改也行)

从新链接,如图:

显示正常.OK!

3、若是是windows 的display language 是English

须要修改location和administrative 下面的language for non-unicode programs

相关文章
相关标签/搜索