<0xEF,0xBB,0xBF> character showing up in files. How to remove them?

Quintin Par picture Quintin Par · Sep 4, 2011 · Viewed 75.3k times · Source

I am doing compressing of JavaScript files and the compressor is complaining that my files have  character in them.

How can I search for these characters and remove them?

Answer

Mohammad Anini picture Mohammad Anini · Feb 28, 2013

You can easily remove them using vim, here are the steps:

1) In your terminal, open the file using vim:

vim file_name

2) Remove all BOM characters:

:set nobomb

3) Save the file:

:wq