#!/bin/bash
find . -type f |\
  while IFS= read -r myfile
  do
	mystring=$(file -i ${myfile})
	if [[ $mystring == *"iso"* ]]; then
		if [[ ${myfile} != *"/CVS/"* ]]; then
			if [[ ${myfile} != *".#"* ]]; then
				if [[ ${myfile} != *"recursive.sh"* ]]; then
					iconv -f ISO-8859-1 -t UTF-8//TRANSLIT ${myfile} -o ${myfile}.tmp
					mv ${myfile}.tmp ${myfile}
				fi
			fi
		fi
	fi
  done

