Solve the problem of "Chinese garbled characters" in Linux, Vi, sqlplus, and putty

Source: Internet
Author: User

 

[Troubleshooting] solves Linux system, Vi, sqlplus, and putty "Chinese garbled characters" [Problem description]
1. Linux system contains ChineseDisplay content file names Garbled;
2. Use the VI editor to view Chinese characters with garbled characters;
3. sqlplus enters DatabaseThe Chinese content is garbled;
4. The Chinese content in Putty is garbled.

[Cause]
1. No InstallPackages supported in Chinese;
2. The corresponding environment variables need to be adjusted accordingly.

[Problem Processing]
1. Confirm the system version
# Cat/etc/RedHat-release
Red Hat Enterprise
Linux ServerRelease 5.1 (tikanga)

2. Check whether the fonts-Chinese language support package has been installed in Linux. If not, download the RPM package of the corresponding version for installation.
# Rpm-AQ | grep fonts-Chinese
Fonts-chinese-3.02-12.el5

3. Modify the/etc/sysconfig/i18n file as follows:
Lang = "zh_cn.gb18030"
Language = "zh_cn.gb18030: zh_cn.gb2312: zh_cn"
Supported = "zh_cn.gb18030: zh_cn: Zh: en_US.UTF-8: en_us: en"
Sysfont = "lata0-sun16"
Export lc_all = "zh_cn.gb18030"

4. Add the following content at the end of/etc/profile:
Export lc_all = "zh_cn.gb18030"

5. Restart the machine. The problem of garbled characters in the file names containing Chinese Characters in Linux and the problem of using the VI editor to view Chinese characters is solved.
# Reboot

6. In OracleAdd the following content to your. bash_profile. SqlplusGo to the database and check whether the Chinese content is garbled.
Export nls_lang = american_america.we8iso8859p1

7. Settings PuttyStored ed in window-Translation
DataAssumed to be in which character set is set to ISO-8859-1: 1998 (Latin-1, West Europe) solves the problem of displaying Chinese content in putty as garbled.

So far, Chinese garbled characters have been solved.


-- The end --

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.