Skip to content

Instantly share code, notes, and snippets.

@MartyEwings
Last active March 7, 2018 11:39
Show Gist options
  • Save MartyEwings/626b37e85d06a409a869a6c8f3807ed7 to your computer and use it in GitHub Desktop.
Save MartyEwings/626b37e85d06a409a869a6c8f3807ed7 to your computer and use it in GitHub Desktop.
#checks all files in the current directory for utf8 compliance
for file in **/*; do
if iconv -f UTF-8 -t UTF-8 $file &>/dev/null ; then
echo "" > /dev/null # left this here incase a positive message is required at some point
else
echo "$file is not valid UTF-8"
fi
done
@daniel5119
Copy link

Looks great Marty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment