handle leading BOM on UTF-8 files