How to remove any BOM from UTF-8 encoded text files
EDIT: Solved with Apache Commons IO BOMInputStream
http://commons.apache.org/io/api-rel...putStream.html
-----------------
I have some text files starting with
ENTRY=
And the reading function
Code :
MyData = new BufferedReader(new InputStreamReader(new FileInputStream(inFile), Encoding));
When the file is encoded with no BOM it's read perfectly, but when contains BOM the line produces something like
?ENTRY=
How can I detect the several encodings and remove them from the stream?