PL/SQL Developer encoding format setting and Chinese garbled solution

Source: Internet
Author: User


1, PL/SQL Developer Text field display garbled

Reason: Because the database number format and the PL/SQL Developer encoding format is not unified.

2, PL/SQL Developer Encoding Format Setup detailed solution is as follows:
First, through the Select Userenv (' language ') from dual; Query the Oracle server-side encoding, such as: American_america. Us7ascii what encoding to display and what code to set
In our client we need to be consistent with the server-side encoding.
So on the client side, you need to set the environment variable: Nls_lang = American_america. Us7ascii can be.

The above is the default encoding



GBK is as follows:

Create a system environment variable in Windows called "NLS_LANG", set its value to "SIMPLIFIED chinese_china.zhs16gbk", and then restart pl/ SQL developer so that the retrieved Chinese content is not scrambled.

Utf-8 is as follows:

If you want to convert to the UTF8 character set, you can assign "NLS_LANG" to "american_america.utf8" and then restart pl/ SQL developer.






Other character set settings are as above.

Nls_lang format
Nls_lang = Language_territory.charset
There are three components (language, geography, and character set), each of which controls the characteristics of the NLS subset. Where: language Specifies the language of the server message. territory specifies the date and number format for the server. CHARSET specifies the character set.


3. How to set the client character set to match the server-side character set:
To run Regedit, the first step is to choose HKEY_LOCAL_MACHINE, the second step is to select software, and the third step is to select Oracle, Fourth step select Nls_lang, and type the same character set as the server side.
For example: American_america. UTF8 or simplified Chinese_china. Zhs16gbk
After the Oracle 11g was installed, a table was built to write Chinese data and found that the tool PL/SQL Developer Chinese is not displayed properly.
To display Chinese correctly, you must have the same server and client code. So check:
1. Check the server code:
Execute SQL Syntax:
SELECT * from V$nls_parameters;
Of course, you can also refer to the Lang and Nls_lang settings in/home/oracle/.bash_profile




Lang=zh_cn. GBK
nls_lang= "Simplified Chinese_china. ZHS16GBK "
2. Set the local client code:
Enter My computer, properties, advanced, environment variables, add 2 items:
Lang=zh_cn. GBK
nls_lang= "Simplified Chinese_china. ZHS16GBK "
3. Reconnect the Sqlplus to view the data and show normal.



PL/SQL Developer encoding format setting and Chinese garbled solution


Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

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.