Iconv 批处理转换编码

728x15 ad here

出自Guoshuang Wiki

跳转到: 导航, 搜索

参考以下若干方法。

find . -name "*.php" -exec iconv -f ISO-8859-1 -t UTF-8 {} -o {}.new \;
find . -name "*.php" -exec mv {} {}.php.new \;
for i in `ls -R *`; do rename -f ’s/\.new$//’ *.new; done
mkdir new 
for a in `ls -R *`; do iconv -f iso-8859-1 -t utf-8 <"$a" >new/"$a" ; done
for file in *.txt
do
 iconv -f iso8859-7 -t utf8 "$file"
done
个人工具
125x125 ad here
Advertisement
120x600 ad here