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.
Oracle Chinese garbled solution:
1. Check the server-side encoding
select userenv('language') from dual;
The actual result I found is: AMERICAN_AMERICA.ZHS16GBK
2. Execute the statement
select * from V$NLS_PARAMETERS
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!