It seems kind of stupid to add a byte order mark to a file for which there cannot be any byte order confusion, so you will not be surprised to learn that the practice of adding BOMs to UTF-8 files is being driven by Microsoft. In its online library, you’ll find this gem:
Always prefix a Unicode plain text file with a byte order mark, which informs an application receiving the file that the file is byte-ordered.
Even when the file is not byte-ordered. Ugh.
von hier: http://www.leancrew.com/all-this/2010/09/duh-bom/
#!/usr/bin/perl -i.bak -p s/^\xef\xbb\xbf//;