如何用iconv批量修改文本编码?

sh/bash/dash/ksh/zsh等Shell脚本
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 如何用iconv批量修改文本编码?

#16

帖子 lilydjwg » 2009-09-19 23:18

hellojinjie 写了:
上面的错误可能是-f 后的参数错误吧,也就是说原来的编码不是gb2312,,
:em23 gb18030 和 gb2312 两种编码可不可以混用的?
gb18030 兼容 gb2312,就像 latin1 兼容 ascii。转编码的话,我一般用 gb18030 或者 gbk (少打几个字母)。
头像
v_han
帖子: 7
注册时间: 2009-09-20 14:42

Re: 如何用iconv批量修改文本编码?

#17

帖子 v_han » 2009-09-21 21:25

daf3707 写了:

代码: 全选

enconv *.txt
:em01 简单,好用!
家的感觉
头像
543082593
帖子: 234
注册时间: 2008-11-07 8:41

Re: 如何用iconv批量修改文本编码?

#18

帖子 543082593 » 2009-10-13 13:10

yangkang5303 写了:
daf3707 写了:

代码: 全选

enconv *.txt


向高手致敬!

cd 到文件夹里面 执行你那代码。结果瞬间1500多txt文本变成了utf-8!!!!
:em11
唉 其实不用啊 windows文本编辑器可以查看 utf8编码的文件 :em05
fall again
smooth criminal
they don't care about us
billie jean
beat it
dangerous
the lost children
childhood
ben
i will be there
speechless
she is out of my life
rock with you
...
LOVE U FOREVER
回复