3 if ! echo "$LC_CTYPE" | grep -Fiq utf-8; then
4 echo "This script requires UTF-8 locale" 1>&2
11 while getopts f:t: opt; do
13 f ) from_enc="$OPTARG" ;;
14 t ) to_enc="$OPTARG" ;;
17 shift `expr $OPTIND - 1`
19 for dir in "${@:-.}"; do
20 cleanup-filenames-recursive.sh "$dir" &&
21 recode-filenames-recursive.py "$from_enc" "$to_enc" "$dir" || exit 1