3 pocharset=`grep "Content-Type: text/plain; charset" $pofile | sed -e 's/\"Content-Type: text\/plain; charset=\\(.*\\)\\\n\"/\\1/'`
5 if test -z $pocharset; then
6 echo "missing charset!"
7 elif test "$pocharset" = "UTF-8"; then
8 echo "charset is already UTF-8. skipping..."
10 echo -n "converting $pocharset to UTF-8..."
11 iconv -f $pocharset -t UTF-8 $pofile > $pofile.utf8
13 echo -n "Replace charset description to UTF-8..."
14 cp $pofile $pofile.bak
15 sed -e 's/Content-Type: text\/plain; charset=.*\\n/Content-Type: text\/plain; charset=UTF-8\\n/' < $pofile.utf8 > $pofile