Adding UTF-8 BOM from the command line


$ sed -i '1s/^/\xef\xbb\xbf/' file-encoded-with-utf8.txt

Licensed under CC BY Creative Commons License ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@emacs.ch ~ 🐦 @torsteinkrause