新手问题 有什么工具一键修改目录中所有文件的编码

zealinux · May 24, 2013 · Last by as181920 replied at May 24, 2013 · 1658 hits

原文件是 EUC-CN 的,想把这些文件转成 utf-8 的。 Mac 上的 iconv 不顶用。

iconv 为什么不行?

不知道 vim 行不行~

vim * '+argdo setl fenc=utf-8' '+wall' '+qall'
find -type f ! -path '*.git*' | xargs sed -i 's/entries_with_data/all_entries_with_data/g'

上面是我用来全局替换的命令,你可以把 sed 改用 iconv -f xx -t xxx 应该可以

You need to Sign in before reply, if you don't have an account, please Sign up first.