ORACLE 11G plsql Chinese display garbled, Linux under Sqlplus query Chinese garbled

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.