What should I do if linux sqlplus is garbled? SQLPlus Chinese garbled processing under Linux
1. First query the database character set
SQL> select userenv('language') from dual; USERENV('LANGUAGE') ---------------------------------------------------- AMERICAN_AMERICA.AL32UTF8 SQL> exit
It is known from the above that the database character set is AMERICAN_AMERICA.AL32UTF8
2. Configure the environment Variable
Set to automatically load after booting and restart and put it in
/home/oracle/.bash_profile
or /etc/profile
echo 'export NLS_LANG="AMERICAN_AMERICA.UTF8"'>>/etc/profile source /etc/profile
3. Query again to recognize Chinese
Cause analysis:
sqlplus garbled characters are related to the NLS_LANG variable of the operating system. When the database character set is inconsistent with the NLS_LANG variable, garbled characters will be generated.
Recommended study: "linux tutorial"
The above is the detailed content of What to do if linux sqlplus is garbled. For more information, please follow other related articles on the PHP Chinese website!