PLSQL inserts garbled Chinese characters, plsql inserts garbled data

Source: Internet
Author: User

PLSQL inserts garbled Chinese characters, plsql inserts garbled data

I recently bought a notebook and re-installed oracle. I used PLSQL. After installation, I tried it and inserted the Chinese SQL value with garbled characters.

Chinese garbled characters are caused by inconsistent encoding. The solution is to unify the encoding.

In this case, the encoding of the client and the server is inconsistent. The solution is as follows:
1.
View server code
Select userenv ('language') from dual;
The actual result I found is: AMERICAN_AMERICA.AL32UTF8
2.
Execute the statement select * from V $ NLS_PARAMETERS
Check whether the VALUE corresponding to NLS_LANGUAGE in PARAMETER in the first line is the same as the VALUE obtained in the first step.
If not, you need to set the environment variable.
Otherwise, the PLSQL client uses inconsistent encoding with the server encoding, and garbled characters will appear when Chinese characters are inserted.
3.
Set Environment Variables
Computer> Properties> advanced system Settings> environment variables> New
Set the variable name: NLS_LANG, and the variable value: the value found in step 1 (my name is AMERICAN_AMERICA.AL32UTF8 ).
4.
Restart PLSQL and insert data normally.

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.