File nls-iconv of Package tcsh

#!/bin/sh

iconv_files () {
   FROM=$1
   shift
   for i in $*
   do
      iconv --from $FROM --to UTF-8 < $i > $i.tmp
      mv $i.tmp $i
      perl -pi -e 's/codeset *= *[^[:space:]]*/codeset=UTF-8/' $i
   done
}

iconv_files ISO-8859-1   nls/C/set*
iconv_files ISO-8859-1   nls/et/set*
iconv_files ISO-8859-1   nls/finnish/set*
iconv_files ISO-8859-1   nls/french/set*
iconv_files ISO-8859-1   nls/german/set*
iconv_files ISO-8859-7   nls/greek/set*
iconv_files ISO-8859-1   nls/italian/set*
iconv_files EUC-JP       nls/ja/set*
iconv_files ISO-8859-2   nls/pl/set*
iconv_files KOI8-R       nls/russian/set*
iconv_files ISO-8859-1   nls/spanish/set*
iconv_files KOI8-U       nls/ukrainian/set*

for i in nls/*/charset ; do
    perl -pi -e 's/codeset *= *[^[:space:]]*/codeset=UTF-8/' $i
    perl -pi -e 's/1 *[^[:space:]]*/1 UTF-8/' $i
done