这个脚本是在utf8环境上编写的,但是在别的机器上看到中文是乱码
1、修改终端的编码为utf8。xshell、putty等
2、export LC_ALL=zh_CN.utf8
# locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.utf8"
LC_NUMERIC="zh_CN.utf8"
LC_TIME="zh_CN.utf8"
LC_COLLATE="zh_CN.utf8"
LC_MONETARY="zh_CN.utf8"
LC_MESSAGES="zh_CN.utf8"
LC_PAPER="zh_CN.utf8"
LC_NAME="zh_CN.utf8"
LC_ADDRESS="zh_CN.utf8"
LC_TELEPHONE="zh_CN.utf8"
LC_MEASUREMENT="zh_CN.utf8"
LC_IDENTIFICATION="zh_CN.utf8"
LC_ALL=zh_CN.utf8
此时vim 查看汉字显示正常了
阅读(6650) | 评论(0) | 转发(0) |