-
-
Save ehrenfeu/7bcbc1022336e764b706 to your computer and use it in GitHub Desktop.
Fix filenames encoded in 437 to UTF-8.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
test -z "$1" && exit 1 | |
# echo "$1" | |
FIXED=$(echo "$1" | iconv -f 437 -t utf8) | |
# echo "$FIXED" | |
if ! [ "$1" == "$FIXED" ] ; then | |
mv -v "$1" "$FIXED" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment