Skip to content

Instantly share code, notes, and snippets.

@tenken
Forked from mustangostang/windows-1251-convert.sh
Created March 3, 2016 23:58
Show Gist options
  • Save tenken/7b4e3f782370142aca75 to your computer and use it in GitHub Desktop.
Save tenken/7b4e3f782370142aca75 to your computer and use it in GitHub Desktop.
Convert windows-1251 to utf-8
#!/bin/zsh
for file in ./**/*.php
do
iconv -f windows-1251 -t UTF-8 "$file" > "${file%.php}-utf8.php"
rm $file
mv ${file%.php}-utf8.php $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment