You can use 'recode' command within script to change encoding of the filenames. You should make some testing and read 'info recode' or at least 'man recode'. You will need more complicated script in order to traverse directories. Here is example scripts to rename files using ISO-8859-1 encoding and to rename them back using default encoding.
Code:
~/xDocs/test> ll *.txt
-rw-r--r-- 1 hro users 0 2008-05-13 09:22 ÄÖÜ.txt
-rw-r--r-- 1 hro users 0 2008-05-13 09:13 öäå.txt
~/xDocs/test> cat utf2iso.sh
#!/bin/bash
# hro, 2008-05-13
#
for fin in *.txt
do (
fout=$(ls $fin | recode ISO-8859-1)
mv $fin $fout
) done
~/xDocs/test> utf2iso.sh
~/xDocs/test> ll *.txt
-rw-r--r-- 1 hro users 0 2008-05-13 09:13 öäå.txt
-rw-r--r-- 1 hro users 0 2008-05-13 09:22 Ã?Ã?Ã?.txt
Code:
~/xDocs/test> cat iso2utf.sh
#!/bin/bash
# hro, 2008-05-13
#
for fin in *.txt
do (
fout=$(ls $fin | recode ..ISO-8859-1)
mv $fin $fout
) done
~/xDocs/test> iso2utf.sh
~/xDocs/test> ll *.txt
-rw-r--r-- 1 hro users 0 2008-05-13 09:22 ÄÖÜ.txt
-rw-r--r-- 1 hro users 0 2008-05-13 09:13 öäå.txt