You can take advantage of the
iconv utility, able to convert a string from an character encoding to another, and to also perform transliteration to similar character, when the destination encoding miss them.
The following script will rename each file passed on the command line to an ascii version of the same name. Modify the variable
input_enc if needed, and run with
--no-test as first parameter to really rename.
if [[ $1 == '--no-test' ]]; then
echo "This is a simulation"
echo "run with --no-test as first parameter to really rename"
echo "$f" | iconv -f "$input_enc" -t ASCII//TRANSLIT
for f; do
if ((test)); then
echo mv -i "$f" "$g"
mv -i "$f" "$g"