RedHatLinux5.5 terminal Oracle garbled solution experience

Source: Internet
Author: User
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

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.