Penso che iconv sia la tua risposta...
Modulo man iconv:
NAME
iconv - Convert encoding of given files from one encoding to another
SYNOPSIS
iconv -f encoding -t encoding inputfile
DESCRIPTION
The iconv program converts the encoding of characters in inputfile from one coded
character set to another. The result is written to standard output unless otherwise
specified by the --output option.
.....
Quindi probabilmente potresti fare un
find $my_base_dir -name "*.php" -o -name "*.html" -exec sh -c "( \
iconv -t ISO88592 -f UTF8 {} -o {}.iconv ; \
mv {}.iconv {} ; \
)" \;
Questo troverà in modo ricorsivo i file con il nome appropriato e li ricodificherà (il file temporaneo è necessario, poiché iconv troncerà l'output prima di iniziare a lavorare).
Ubuntu ha la ricodifica
$ sudo apt-get install recode
$ recode UTF-8..latin1 *.php
Ricorsivamente, grazie a Ted Dziuba:
$ find . -name "*.php" -exec recode UTF-8..latin1 {} \;