PLSQL garbled problem solution

1. Chinese fields of pl/ sql developer display garbled characters
Reason: Because the numbering format of the database and the coding format of pl/ sql developer are not unified.
Second, view and modify the Oracle database character set:
select userenv('language') from dual;
search result:
AMERICAN_AMERICA.AL32UTF8


3. Modify the encoding format of pl/sql developer:
Create a system environment variable named "NLS_LANG" in windows, set its value to AMERICAN_AMERICA.AL32UTF8,
Then restart pl/sql developer, so that the retrieved Chinese content will not be garbled. If you want to convert to UTF8 character set, you can assign "NLS_LANG" to "AMERICAN_AMERICA.UTF8", and then restart pl/sql developer. Other character set settings are the same as above

NLS_LANG is an environment variable that defines language, locale, and character set properties. For non-English character sets, the setting of NLS_LANG is very important.

NLS: 'National Language Support (NLS)' When we set an nls, we actually specified some expressions specific to his language for Oracle when storing data. For example, if we choose Chinese, then its Chinese How characters are stored, what rules are sorted, how currencies are represented, and the date format is also set.
 
The NLS_LANG parameter consists of the following parts: NLS_LANG=<Language>_<Territory>.<Clients Characterset>
NLS_Language specifies:
- the language of Oracle (error) messages
- the name of the day and month
Note : NLS_LANGUAGE is associated with *data* inserted and queried Language is irrelevant.

NLS_Territory specifies:
- currency and number formats
- ranges and conventions for calculating days and

days CLIENTS CHARACTERSET:
- defines the encoding used by Oracle clients, client applications
* or it should conform to your Microsoft Windows code page (GUI tool ACP, CHCP value of command prompt)
* or set to UTF8/AL32UTF8 for Unicode WIN32 applications.
 
Common values ​​can be found in Oracle Database Client Globalization Support

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326387541&siteId=291194637