|
Yu Zhang made changes - 30/Jul/07 09:54 AM
I ran the grep search on windows, no results. Martin ran it on linux, no results either. Have you actually tried this?
Perhaps it's Mac OS X only featute. Here it's the list:
grep -rl $'\xEF\xBB\xBF' * lang/en_utf8/admin.php (obviously, binaries can be skipped)
Nicolas Connault committed 5 files to 'Moodle CVS' - 30/Jul/07 07:51 PM
Thanks for the tips, Eloy!
Nicolas Connault made changes - 30/Jul/07 07:54 PM
I've detected that some of the files were lang files and the utf8=>iso=>utf8 conversion trick isn't usable at all there (in fact it break files).
I've fixed them now in CVS and edited the initial message with a simpler and safer way to delete those BOM characters with "vi". Ciao
Dan Poltawski made changes - 09/Aug/07 03:42 AM
Eloy Lafuente (stronk7) made changes - 09/Aug/07 11:56 PM
Attached one shell script (bom_out.sh) that will, recursively, kill all BOMs. Only tested in Mac OS X.
Please, review changes before commit them. Ciao
Eloy Lafuente (stronk7) made changes - 10/Aug/07 06:22 AM
Eloy Lafuente (stronk7) made changes - 10/Aug/07 06:24 AM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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:
vim FILE
:set nobomb
(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