服务器编码格式
iconv -f oldcharset -t newcharset .txt >(-0) .txttemp
mv .txttemp .txt
#!/bin/sh
charset=`file -i test.log|awk -F = '{print $2}' `
echo "$charset"
iconv -f "$charset" -t utf-8 test.log > testTEMP.log
mv testTEMP.log test.log
服务器编码格式
iconv -f oldcharset -t newcharset .txt >(-0) .txttemp
mv .txttemp .txt
#!/bin/sh
charset=`file -i test.log|awk -F = '{print $2}' `
echo "$charset"
iconv -f "$charset" -t utf-8 test.log > testTEMP.log
mv testTEMP.log test.log