vmware挂载共享目录
ldd查看依赖库

iconv修改文件编码

妙音 posted @ 2018年5月17日 11:21 in linux with tags linux , 1289 阅读
  • 查看文件编码
➜  ~ file a.py
a.py: ASCII text
 
  • 编码转换
 
iconv a.py -f ascii -t utf-8 -o b.py --verbose

-f,from-coding 源文件编码
-t,to-coding  输出文件编码
-o 输出文件
 
大字符集转为小字符集,会有内容丢失,并且报错,如utf-8有中文时转为ascii
 
  • 查看已知字符集
iconv -l
 

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter