fix UTF-8 BOM logic test