Solution to garbled characters on the Character interface of RedhatLinux9

Source: Internet
Author: User
Because the default language selected when RedHatLinux9 is installed is Chinese, garbled characters may occur on the Character interface. It is extremely difficult to debug the program in CLI mode because all error messages are garbled. The following figure shows the solution to garbled characters on the Character interface. Note: The following # Shows method 1 of the command prompt: Step 1: # locale (the locale command is used to view detailed information about the language used, for Chinese Language) Step 2: # exportLC_ALL = POSIX (export

Because the default language selected when installing RedHat Linux 9 is Chinese, garbled characters may occur on the Character interface. It is extremely difficult to debug the program in CLI mode because all error messages are garbled. The following is a solution record for garbled characters on the Character interface:

Note: The following # is a command prompt.

Method 1:

Step 1: # locale (the locale command is used to view detailed information about the language used, which is a Chinese language)

Step 2: # export LC_ALL = POSIX (the export command exports and modifies the LC_ALL language options. Note that there is no space between LC_ALL and "=)

Step 3: # locale (check again, the information has been modified)

Note: This method will expire after the user logs out or restarts. To save the settings, see method 2.

Method 2:

Step 1: # vi/etc/sysconfig/i18n (use the vi editor to modify the configuration file i18n)

Step 2: Press enter To Go To The vi editing page

Step 3: enter a small letter: I to enter the editing mode

Write LC_ALL = posix to the i18n configuration file,

Step 4: press the Esc key on the keyboard to exit the editing mode.

Enter the colon ':' to mark the light at the colon, enter lower case: wq (wq is the SAVE and exit command), and press ENTER

The cancellation or restart of the Service takes effect permanently.

Related Article

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.