I encountered a problem during development today: the virtual machine installed radhat5 and radhat5 installed eclipse, but eclipse does not support Chinese characters. In this case, when I read the code, the comments are garbled, so I spent some time solving this problem. I will share with you the following experience: RedHatLinux5 Chinese package installation process: 1. first install redhat5 Chinese package: fonts-chinese-3.02-12.el5.noarch.rpmm17n-
I encountered a problem during development today: the virtual machine installed rad hat 5 and rad hat 5 installed eclipse, but eclipse does not support Chinese characters. In this way, when I read the code, the comments are garbled, so I spent some time solving this problem and share my experience with you:
Red Hat Linux 5 Chinese package installation process:
1. First install the red hat 5 Chinese package:
Fonts-chinese-3.02-12.el5.noarch.rpm
M17n-db-common-cjk-1.3.3-46.el5.noarch.rpm
M17n-db-chinese-1.3.3-46.el5.noarch.rpm
Note: you can find the name of the package directly searched by Baidu. After these packages are installed, they can be displayed in Chinese and must be installed in sequence.
2. After the installation is complete, you need to set the system file, that is, modify the default language of the Linux system:
1. Backup File
/Etc/sysconfig/i18n is the system language configuration file. Back up the file before modification.
# Cp/etc/sysconfig/i18n/etc/sysconfig/i18n. bak
2. modify the configuration file:
Modify the configuration file as follows:
LANG = "zh_CN.GB18030"
SUPPORTED = "zh_CN.GB18030: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "latarcyrheb-sun16"
The first line indicates the language environment variable settings of your current system. Here is zh_CN.GB18030
The second line indicates that the system has preset language support and the language not in the project cannot be properly displayed.
The third line defines the console terminal font, the font displayed when you log on to text is the latarcyrheb-sun16
3. Restart the VM.
Eclipse Chinese settings:
After installing the linux Chinese package, you only need to set it in eclipse to display Chinese characters:
Preferences-> General-> workspace-> Text file coding is set to GBK (enter the dot to confirm.