Unverified Commit c2c74fc9 authored by Anna Henningsen's avatar Anna Henningsen Committed by Myles Borins
Browse files

encoding: make TextDecoder handle BOM correctly

Do not accept the BOM if it comes from a different encoding, and
only discard the BOM after it has actually been read (including
when it is spread over multiple chunks in streaming mode).

Fixes: https://github.com/nodejs/node/issues/25315

PR-URL: https://github.com/nodejs/node/pull/30132


Reviewed-By: default avatarGus Caplan <me@gus.host>
parent 9b11bdb0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment