There are many projects with ISO-8859-1 character encoding - problems arise, when you try to integrate external software/libraries into them. By default, every web project should use UTF-8 to encode its files. Prototype's Ajax.Request() for example can't handle anything different to UTF-8 and gets you into big trouble, when you try to send german umlauts with it.
But how to convert a complete ISO (Symfony) project to UTF-8?
It's pretty simple: First, we need to determine which files need to be converted and write them into a text file. In a symfony project, this should be all templates, all javascripts and all configuration stuff. It can simply be done by entering the following commands in a shell (located in the symfony projects' root directory):
find -iname '*.php' > convert
find -iname '*.yml' >> convert
find -iname '*.js' >> convert
You can filter the result by editing the newly created "convert" file.
Then, you are able to convert all files to utf8, this is done by:
for i in `cat convert`; do echo iconv --from-code=ISO-8859-1 --to-code=UTF-8 $i > $i.utf8 ; done
The command creates for each file found in "convert" a new file with the same name of the old one, except with an additional .utf8 extension.
In a last step, the .utf8 will be removed to overwrite the existing ISO files:
for i in `find -iname '*.utf8'`; do mv $i ${i%.*}; done
Don't forget to change the (sf_)charset configuration option in all settings.yml's to utf-8.
Before you submit the changes to the repository, you should also run your testsuite and look over the project manually.
That's it!