mercoledì 4 giugno 2014

Remove BOM header from UTF-8 file in Unix

A lot of Windows editors save your UTF-8 files with the BOM header (the hexadecimal sequence ef bb bf). You have some problem when it's necessary to use these files in Unix platform.
To remove the BOM header from the your file, you can choose one of the following ways.

# On Linux
tail --bytes=+4 your_utf-8_file

# On Unix (IBM AIX or Oracle SOLARIS)
tail +4c your_utf-8_file

Nessun commento:

Posta un commento