Skip to content

Instantly share code, notes, and snippets.

@Sibirtsev
Created March 7, 2020 11:37
Show Gist options
  • Save Sibirtsev/289547a68b52c6edd1ca34f5eaa9875f to your computer and use it in GitHub Desktop.
Save Sibirtsev/289547a68b52c6edd1ca34f5eaa9875f to your computer and use it in GitHub Desktop.
Convert files to utf
#!/bin/sh
find . -type f -print | while read f; do
mv -i "$f" "$f.recode.$$"
iconv -f iso-8859-1 -t utf-8 < "$f.recode.$$" > "$f"
rm -f "$f.recode.$$"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment