In RedHat5.5, it is difficult to install Oracle10g. When querying data, the Chinese text displayed on the terminal is garbled: SQL & gt; selectnamefromscott. studentwhereid = 23; NAME ----------?? Each Chinese Character displays a question mark (in the database, he is indeed a Chinese character). What is the reason? by querying online information, the following solution is obtained: 1. Ensure that the data is ZHS16GB in the database.
In RedHat 5.5, Oracle 10 Gb cannot be easily installed. When querying data, the Chinese text displayed on the terminal is garbled:
SQL> select name from scott. student where id = 23;
NAME
----------
??
Each Chinese Character displays a question mark (in the database, he is indeed a Chinese character). Why? by querying online information, we can follow these steps:
1. Make sure that the data is in the ZHS16GBK character set in the database
2. Edit the./home/$ username/. bash_profile file.
Add: NLS_LANG = AMERICAN_AMERICA.ZHS16GBK;
Export NLS_LANG
After editing: wq! Save and exit.
3. Shut down the database and log off the current user.
4. Log On again (at this time, the system will read the environment variables added above ).
Open the console terminal to test whether the added environment variable has taken effect:
[Oracle @ localhost ~] $ Echo $ NLS_LANG
AMERICAN_AMERICA.ZHS16GBK
Output instructions take effect