I have a file containing UTF-8 encoded text with a byte-order mark. This BOM is getting in the way of things, and I'd like to remove it.
Resorting to either other tools, such as perl or awk, or weird editing modes, such as hexl-mode, every time I want to get rid of a BOM is somewhat annoying.
Is there a way to tell Emacs to remove the existing BOM and not to write it out to disk again on subsequent saves?
set-buffer-file-coding-system
utf-8-with-signature
to add the BOM and then save the file withC-x C-s
, the file is saved without the signature. – Jukebox