发上个小脚本
发表于 : 2009-10-14 18:26
批量转换gb18030到utf8的
#!/bin/sh
for file in `find ./dd -name *.H -or -name *.h -or -name *.CPP -or -name *.C -or -name *.c ` ;do
echo $file
if test -f $file ; then
echo "====is file=="
iconv -f gb18030 -t UTF-8 $file >gbktoutf8
# sleep 1
cp -f gbktoutf8 $file
# sleep 1
fi
done
需要的自己看着改改吧
我是从这搞到的
http://wellstrand.spaces.live.com/blog/ ... !290.entry
#!/bin/sh
for file in `find ./dd -name *.H -or -name *.h -or -name *.CPP -or -name *.C -or -name *.c ` ;do
echo $file
if test -f $file ; then
echo "====is file=="
iconv -f gb18030 -t UTF-8 $file >gbktoutf8
# sleep 1
cp -f gbktoutf8 $file
# sleep 1
fi
done
需要的自己看着改改吧
我是从这搞到的
http://wellstrand.spaces.live.com/blog/ ... !290.entry