您的位置:首页 > 其它

source insight 下看不了utf-8中文字符

2013-08-26 20:34 92 查看
utf-8中文在source insight中显示为乱码,写了一个简单脚本,在linux下将代码转换为GBK格式,然后在source insight下正常查看。

#!/bin/sh

function conv() {
echo "Converting $1"
enca -L zh_CN -x GBK $1
}

function walk() {
for file in `ls $1`
do
if [ -d $1"/"$file ]
then
walk $1"/"$file
else
conv $1"/"$file
fi
done
}

walk $1


保存为conv.sh 使用方法 ./conv.sh dir
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: