UbuntuLinux perfectly supports Chinese pinyin sorting

Source: Internet
Author: User
By default, most Linux distributions do not support Chinese characters sorted by pinyin. For software development, if the server needs to sort Chinese characters, it may be difficult to achieve this. The solution to this problem is simple. You only need to install a locale-pinyin software package on Linux and configure the corresponding system environment variables, the Linux system can perfectly support Chinese pinyin sorting. For Ubuntu users, if the source of ubuntu-cn is not configured before

By default, most Linux distributions do not support Chinese characters sorted by pinyin. For software development, if the server needs to sort Chinese characters, it may be difficult to achieve this. The solution to this problem is simple. You only need to install a locale-pinyin software package on Linux and configure the corresponding system environment variables, the Linux system can perfectly support Chinese pinyin sorting.

For Ubuntu users, if the source of ubuntu-cn is not configured before, you need to configure the apt source. For example, cn99.com is used:

Deb http://ubuntu.cn99.com/ubuntu-cn/ gutsy main restricted universe multiverse then run

Sudo apt-get upgrade

Sudo apt-get install locale-pinyin and then edit the/etc/environment file to add or modify the file:

LC_COLLATE = "zh_CN.UTF-8" for other Linux users, you can download locale-pinyin and unzip the compilation and installation. The command is as follows:

Tar xzf locale-pinyin.tar.gz

Cd locale-pinyin

./Configure

Make

Make install and edit/etc/profile or ~ /. Profile, just like Ubuntu users

Export LC_COLLATE = "zh_CN.UTF-8" after installation, modification, restart X Window or log out of the user, log on to the system again, the above changes take effect.

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.