Troubleshooting of garbled Chinese characters on Mint (Ubuntu) Linux Terminals

Source: Internet
Author: User

Mint (Ubuntu) Linux terminal Chinese display garbled problem solution 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 =" zh_CN.UTF-8 "LANGUAGE =" zh_CN: zh: en_US: en "the second line 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.
 

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.