当前位置:首页 > 系统教程 > 其它教程 > 详细页面

CentOS如何设置文件字符编码

时间:2017-01-12来源:雨林木风pe工具作者:佚名

 

  1、查看文件字符编码

  ###using file command###

  [root@ipython report]# file --mime-encoding analysis.csv

  analysis.csv: utf-8

  ###using vim command###

  [root@ipython report]# vim analysis.csv

  :set fileencoding

  fileencoding=utf-8

  2、设置文件字符编码

  ####using iconv command####

  syntax:

  iconv -f old_encoding -t new_encoding filename

  ###example###

  [root@ipython report]# iconv -f utf-8 -t gbk analysis.csv > new_analysis.csv

  ###using vim command###

  :set fileencoding=gbk

  :wq!
 

分享到:

相关信息

系统教程栏目

人气教程排行

站长推荐

热门系统下载