Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 192009
 

How to remove BOM from UTF-8?

Answer:

# awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' text.txt

Source: http://stackoverflow.com/questions/1068650/using-awk-to-remove-the-byte-order-mark

Updated: (Suggested by Van Overveldt Peter)

# tail --bytes=+4 text.txt

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>