Troubleshooting of garbled Chinese characters on Mint (Ubuntu) Linux terminals
Source: Internet
Author: User
Mint (Ubuntu) Linux Terminal Chinese display garbled problem 0, install zhcon1sudoapt-getinstallzhcon solution: a Ubuntu default Chinese character encoding for zh_CNUTF-8, in etcenvironment, we can see that the Mint (Ubuntu) Linux Terminal solves the problem of garbled characters in Chinese. 0. install zhcon 1 sudo apt-get install zhcon. Solution: 1. ubuntu default Chinese character encoding for zh_CN.UTF-8, this can be seen in/etc/environment: sudo gedit/etc/environment can see the following content: PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/games "LANG =" The second line of zh_CN.UTF-8 "LANGUAGE =" zh_CN: zh: en_US: en "is the default Chinese character encoding. Note: You can modify the default Chinese character encoding here, for example, zh_CN.GBK. 2. add Chinese character encoding method 1. directly run the locale-gen command on the terminal: sudo locale-gen zh_CN.GB18030 to add the Chinese character set. After that, go to/usr/lib/locale/. there is a folder named zh_CN.gb18030, and enter the command gedit/var/lib/locales/supported on the super terminal. d/local. you can find another row in the file: zh_CN.GB18030 GB18030. It indicates that the application is successfully added. 2. modify/var/lib/locales/supported. d/local file on the terminal, enter the command line sudo gedit/var/lib/locales/supported. d/local can see the following content: 1zh_CN.UTF-8 UTF-82en_US.UTF-8 UTF-8 in the end of the file to add the Chinese character set 1zh_CN.GBK GBK save and exit. Enter the command in the terminal: 1 sudo dpkg-reconfigure localesGenerating locales... en_AU.UTF-8... doneen_BW.UTF-8... doneen_CA.UTF-8... doneen_DK.UTF-8... doneen_GB.UTF-8... doneen_HK.UTF-8... doneen_IE.UTF-8... doneen_IN.UTF-8... doneen_NZ.UTF-8... doneen_PH.UTF-8... doneen_SG.UTF-8... doneen_US.UTF-8... doneen_ZA.UTF-8... doneen_ZW.UTF-8... donezh_CN.GBK... donezh_CN.UTF-8... up-to-datezh_HK.UTF-8... donezh_SG.UTF-8... Donezh_TW.UTF-8... doneGeneration complete. you can generate the corresponding file:/usr/lib/locale/zh_CN.gbk/finally restart ubuntu.
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