This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The "BOM seen flag" is relevant to a single stream. Therefore it should be reset before decoding a new stream, e.g. decoder = new TextDecoder('utf-8'); // BOM seen initially unset decoder.decode(buffer1); // so unset when decode begins decoder.decode(buffer2); // needs to be unset before this decoder.decode(buffer3a, {stream: true}); // needs to be unset before this decoder.decode(buffer3b); // but not before this Step 1 for decode(input, options) should be changed from: 1. If the streaming flag is unset, set the encoding state to the default values of the encoding's decoder's associated variables and empty the stream. to: 1. If the streaming flag is unset, set the encoding state to the default values of the encoding's decoder's associated variables, unset the BOM seen flag, and empty the stream.
https://github.com/whatwg/encoding/commit/01f872bf168e138533d5aa67405d358f8c2fdc94