The original system is Ubuntu8.04, and the latest version 10.04 has been tested. Thank you for sharing your knowledge about various technologies! I. Ubuntu default Chinese character encoding in/etc/environment see: pprun @ pprun-t61 :~ $ Sudogedit/etc/environmentLANG = "zh_CN.UTF-8" LANGUAGE = "zh_CN: zh: en_US: en" 2. Add Chinese character encoding method 1. Use lo directly
The original system is Ubuntu 8.04, and the latest version 10.04 has been verified ..
Thanks for sharing various technologies!
I. Ubuntu default Chinese character encoding
In/etc/environment, you can see:
Pprun @ pprun-t61 :~ $ Sudo gedit/etc/environment
LANG = "zh_CN.UTF-8"
LANGUAGE = "zh_CN: zh: en_US: en"
2. How to add Chinese character encoding
1. Use the locale-gen command directly:
Pprun @ pprun-t61 :~ $ Sudo locale-gen zh_CN.GB18030
Pprun @ pprun-t61 :~ $ Cd/usr/lib/locale/
A folder named zh_CN.gb18030 is generated.
Pprun @ pprun-t61 :~ $ Gedit/var/lib/locales/supported. d/local
The file contains one more row: zh_CN.GB18030 GB18030
2. Modify the/var/lib/locales/supported. d/local file
Pprun @ pprun-t61 :~ $ Sudo gedit/var/lib/locales/supported. d/local
Zh_CN.UTF-8 UTF-8
En_US.UTF-8 UTF-8
Add a row:
Zh_CN.GBK GBK
Save and exit.
Pprun @ pprun-t61 :~ $ Sudo dpkg-reconfigure locales
Generating locales...
...
En_US.UTF-8... done
En_ZA.UTF-8... done
En_ZW.UTF-8... done
Zh_CN.GBK... done
Zh_CN.UTF-8... up-to-date
...
Generation complete.
You can generate the corresponding file:/usr/lib/locale/zh_CN.gbk/