惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 东国先生

MongoDB - 安装及相关资料 8种Nosql数据库系统对比 Apache 服务器安装和配置相关资料 ffmpeg: error while loading shared libraries: libavdevice.so.53 亚马逊S3 - The difference between the request time and the current time is too large. Imagick setFont() 不能设置字体问题 当Linux中glibc被无意删除后…… 解决Linux中文乱码 Linux下PHP文件操作提示无权限 还原sql server数据库时,无法获得对数据库的独占访问权 zen-cart开发教程 - 通知者/观察者模式 zen-cart开发教程 - 开发Sidebox插件 修改zen-cart下单和付款流程以防止漏单 利用反射设置对象的属性(Property) 【转载】Paypal 标准变量列表 C#中的委托 zen-cart开发教程 - 概述 PHP文件操作函数 2009年终总结
vim终端下中文乱码问题
东国先生 · 2012-03-22 · via 博客园 - 东国先生

远程登录服务器用vim在终端下编辑查看文件经常会遇见各种中文乱码问题。
做如下设置可基本解决vim中文乱码问题

首先查看系统对中文的支持
locale -a | grep zh_CN

输出样例如下
zh_CN.gbk
zh_CN.utf8

vim 只能正确识别列表中的中文编码文件,如需识别其他编码类型的中文文件,则需要做系统升级

vi ~/.bash_profile
文件末尾添加

export LANG="zh_CN.UTF-8"              或者"en_US.UTF-8"
export LC_ALL="zh_CN.UTF-8"           或者"en_US.UTF-8"

vi ~/.vimrc
文件末尾添加

let &termencoding=&encoding
set fileencodings=utf-8,gbk,utf-16,big5