修改gb2312网页编码为utf-8

Posted by 4Aiur on 01/10/2011 in Shell |

修改gb2312网页编码为utf-8

find html/ -type f -name "*.html" | \
while read line
do
    mkdir -p foo/dirname $line/
    iconv -f GB18030 -t UTF-8 $line 2>/dev/null | \
    sed /charset=gb2312/'s/charset=gb2312/charset=utf-8/' \
    > foo/$line
done

Tags:

Copyright © 2010-2019 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.