Yesterday we had a Problem with non UTF-8 Files in the Project (happened in accident).
So I wrote a small bash script that should do the trick. It recursively converts all .php files to UTF-8 encoding
Requirements:
- Linux system
- iconv
Script:
for i in $(find -name '*.php');do encoding=$(file -bi $i | sed -e 's/.*[ ]charset=//'); iconv -f $encoding -t UTF-8 -o $i $i; done
Greetings
rho

Help















