How can I check if a utf-8 text file have a BOM from command line?
file
command shows me UTF-8 Unicode text
.
But I don't know it means there is no BOM in the file.
I'm using Ubuntu 12.04
.
unicode
How can I check if a utf-8 text file have a BOM from command line?
file
command shows me UTF-8 Unicode text
.
But I don't know it means there is no BOM in the file.
I'm using Ubuntu 12.04
.
Best Answer
file
will tell you if there is a BOM. You can test:Note: according to the
file
changelog, this feature existed already in 2007. So, this should work on any current machine.