当前位置主页 > 系统教程 >

Centos配置文件字符编码的办法

发布日期:2018-02-22      作者:深度系统      来源:http://www.05381.com


Centos配置文件字符编码的办法?

  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!
 

我要分享:

栏目专题推荐

系统下载推荐

系统教程推荐



本站发布的系统与软件仅为个人学习测试使用,不得用于任何商业用途,否则后果自负,请支持购买微软正版软件!

Copyright @ 2020 深度系统版权所有