Remove the UTF-8 Byte Order Mark (BOM) with vi


A few programs that I use save in UTF-8 (yay!) with a byte-order-mark (boo!). Here’s a simple hack to get rid of them:

vim -c "set nobomb" -c wq! filewithbom.txt

Tags:  text

Share: