diff --git a/core.js b/core.js index d3d6ab53..407b0e8d 100644 --- a/core.js +++ b/core.js @@ -1066,6 +1066,13 @@ async function _fromTokenizer(tokenizer) { }; } + if (check([0xEF, 0xBB, 0xBF]) && checkString(' + + UTF-8 with BOM + diff --git a/test.js b/test.js index b27bddd3..610a6f24 100644 --- a/test.js +++ b/test.js @@ -206,6 +206,10 @@ const names = { webm: [ 'fixture-null', // EBML DocType with trailing null character ], + xml: [ + 'fixture', + 'fixture-utf8-bom', // UTF-8 with BOM + ], }; // Define an entry here only if the file type has potential