Problem Description:
Local is Win7 operating system, cmd inside Sqlplus go in and connect Oracle database, Chinese can be displayed normally, but Plsql Connection Oracle database, Chinese display garbled, and Xshell Remote Connection Oracle server log in to use Sqlplus Login also shows Chinese garbled characters.
1. Check the character set of Oracle server side Sqlplus in Windows7 below CMD.
Open cmd, log in with Sqlplus, and enter the character set of the SQL query server below.
Sql> Select Userenv (' language ') fromdual;
USERENV (' LANGUAGE ')
------------------------------------------------
American_america. Zhs16gbk
Sql> Select Userenv (' language ') fromdual;
As shown in the 2.png:
Go backstage Linux view character set encoding,
(1), view profile file
[Email protected] ~]$ Vim/home/oracle/.bash_profile
Export LANG=EN_US.GBK
Export Nls_lang=american_america. Zhs16gbk
(2) To view the Userenv of the database
Sql> Select Userenv (' language ') fromdual;
USERENV (' LANGUAGE ')
----------------------------------------------------
American_america. Zhs16gbk
Sql>
2, Plsql Chinese garbled problem
The Plsql character set is required, plsql the Nls_lang character set of the Windows system variable is loaded by default, so go to my computer, right-click on "Properties", select "System Advanced Settings", then "environment variable", then "System variable", create or modify Nls_ Lang
Variable name: Nls_lang
Variable value: Simplified Chinese_china. Zhs16gbk
As shown in the 1.png:
3, SSH connection Oracle server, Linux under Sqlplus login Chinese garbled, as follows:
Sql> Select Userenv (' language ') fromdual;
USERENV (' LANGUAGE ')
----------------------------------------------------
American_america. Zhs16gbk
Sql> Select T.recruitment_task_name frompowerdesk.hr_resume t where t.resume_cd= ' BL1424067222966 ';
Recruitment_task_name
--------------------------------------------------------------------------------
?? ±
ORACLE 11G plsql Chinese display garbled, Linux under Sqlplus query Chinese garbled