Executing this under Moodle dir:
grep -rl $'\xEF\xBB\xBF' *
should return all the files with the BOM.
Once ignored all the binary files, each text file (php, xml...) should be processed with some thing like:
(save and exit)
Don't forget to cvs diff FILE to check that only the 1st line (1st character) has changed.
Finally, I've attached one shell script (bom_out.sh - only tested under MacOS X) that will search and destroy all the BOMs under directory where it's executed.
Please, before committing, execute one "cvs diff" to check that only BOMs have been deleted!!
Hope this helps...ciao