Skip to content

Instantly share code, notes, and snippets.

@iznog
Created November 16, 2017 11:05
Show Gist options
  • Select an option

  • Save iznog/4eda36d0a1c69c474ccc54cb8ded17df to your computer and use it in GitHub Desktop.

Select an option

Save iznog/4eda36d0a1c69c474ccc54cb8ded17df to your computer and use it in GitHub Desktop.
converting project code from iso8859-1 to utf8
#!/bin/sh
for i in $(ls -lh *.php | awk -F " " '{print $9}')
do
iconv -t utf8 -f iso-8859-1 $i -o $i.utf8
done
cd auth
for i in $(ls -lh *.php | awk -F " " '{print $9}')
do
iconv -t utf8 -f iso-8859-1 $i -o $i.utf8
done
cd ../objects
for i in $(ls -lh *.php | awk -F " " '{print $9}')
do
iconv -t utf8 -f iso-8859-1 $i -o $i.utf8
done
cd ../resources
for i in $(ls -lh *.php | awk -F " " '{print $9}')
do
iconv -t utf8 -f iso-8859-1 $i -o $i.utf8
done
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment