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.