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、設(shè)置文件字符編碼
####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!
版權(quán)聲明:文章圖片資源來(lái)源于網(wǎng)絡(luò),如有侵權(quán),請(qǐng)留言刪除!!!
評(píng)論