Ubuntu10.04 language environment and character encoding

Source: Internet
Author: User
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/

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.