Skip to content

Tag: byte-order-mark

Byte order mark screws up file reading in Java

I’m trying to read CSV files using Java. Some of the files may have a byte order mark in the beginning, but not all. When present, the byte order gets read along with the rest of the first line, thus causing problems with string compares. Is there an easy way to skip the byte order mark when it is present?