Character garbled Characters Under vi-general Linux technology-Linux technology and application information. The following is a detailed description. In fact, this is a small problem. It is often encountered that after the file is edited using gedit and opened with vi, many Chinese characters in the comments are all garbled, which is a coding problem, but I haven't been looking for how to modify the configuration file. Today I found out why.
In gedit, the input method is fcitx, fcitx is gb encoding by default, and vim is UTF-8 by default (I checked it as if gedit is also UTF-8 by default ), so it will be garbled. Modified the configuration file so that vi supports the gb encoding.
Modify. vimrc:
Let & termencoding = & encoding
Set fileencodings = UTF-8, gbk
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