1

I have created an html webpage when I run it at the bottom of the page there's some unwanted characters uncoding . I tried to get rid of it through vi using set nobomb but it still appears in the webpage, the file is saved as UTF8, does anyone know how I can get rid of this?

  • If it's saved as utf8, just delete the . Utf8 doesn't need a BOM. – PSkocik Mar 26 '16 at 22:10
  • It's appearing in the webpage not in my code so I can't just delete it – Katz Mar 26 '16 at 22:12
2

A byte-order-mark would only be at the beginning of a file (not at the end). You may have gotten that at the end of the file by appending a UTF-8 file to a non-UTF-8 file.

However, you can use vim for editing (and removing) the stray BOM:

:%s/^Vufeff//g

where that ^V is controlV.

Further reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.