Home > Database > Oracle > body text

What should I do if the Chinese characters in Oracle are garbled?

coldplay.xixi
Release: 2020-07-16 10:47:13
Original
6297 people have browsed it

Oracle Chinese garbled solution: first check the server-side encoding; then execute the statement and check whether the value of the VALUE item is consistent with the server encoding; then set the environment variable; and finally restart PLSQL.

What should I do if the Chinese characters in Oracle are garbled?

Oracle Chinese garbled solution:

1. Check the server-side encoding

select userenv('language') from dual;
Copy after login

The actual result I found is: AMERICAN_AMERICA.ZHS16GBK

2. Execute the statement

 select * from V$NLS_PARAMETERS
Copy after login

to check whether the PARAMETER item in the first line is NLS_LANGUAGE and the corresponding VALUE The same value as the first step.

If not, you need to set the environment variable.

Otherwise, the encoding used by the PLSQL client is inconsistent with the server-side encoding, and garbled characters will appear when inserting Chinese.

3. Settings Environment variables

Computer->Properties->Advanced system settings->Environment variables->New

Set variable name: NLS_LANG

Variable value: The value found, mine is AMERICAN_AMERICA.ZHS16GBK

4. Restart PLSQL and insert data normally

Related learning recommendations: oracle database learning tutorial

The above is the detailed content of What should I do if the Chinese characters in Oracle are garbled?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!