Debian Chinese content garbled Solution

Source: Internet
Author: User
Debian Chinese content garbled solution-Linux Release Technology-Debian information. The following is a detailed description. The last time I upgraded testing.

Something went wrong ..

The system is in Chinese.

Modify/etc/enviroment

LANG = "en_US"
LANGUAGE = "en_CN: en_US: zh_CN: en"
LC_CTYPE = "zh_CN.UTF-8" # If this place does not use zh_CN * fcitx
XMODIFIERS = @ im = fcitx # This is used for fcitx

Current local environment:
# Locale
LANG = en_US.UTF-8
LC_CTYPE = zh_CN.UTF-8
LC_NUMERIC = "en_US.UTF-8 ″
LC_TIME = "en_US.UTF-8 ″
LC_COLLATE = "en_US.UTF-8 ″
LC_MONETARY = "en_US.UTF-8 ″
LC_MESSAGES = "en_US.UTF-8 ″
LC_PAPER = "en_US.UTF-8 ″
LC_NAME = "en_US.UTF-8 ″
LC_ADDRESS = "en_US.UTF-8 ″
LC_TELEPHONE = "en_US.UTF-8 ″
LC_MEASUREMENT = "en_US.UTF-8 ″
LC_IDENTIFICATION = "en_US.UTF-8 ″
LC_ALL =

The terminal Chinese file name is displayed normally ..
Gedit & vim garbled content

1. Solve gedit garbled:
Run gconf-editor
?> App?> Gedit2?> Preferences?> Encodings
Auto_detected should have no GBK or GB2312. You can add it to GBK (it doesn't matter if it's all written ).
In this way, if you use gedit again to open the gb2312 encoded text, there will be no garbled content ..

2. vim garbled solution:
Add the following code to the/etc/vim/vimrc file:

Let & termencoding = & encoding
Set fileencodings = UTF-8, gbk, ucs-bom, cp936
Related Article

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.