encoding: make TextDecoder handle BOM correctly by addaleax · Pull Request #30132 · nodejs/node

@nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

lib / src

Issues and PRs related to general changes in the lib or src directory.

labels

Oct 26, 2019

@addaleax addaleax added encoding

Issues and PRs related to the TextEncoder and TextDecoder APIs.

review wanted

PRs that need reviews.

and removed lib / src

Issues and PRs related to general changes in the lib or src directory.

labels

Nov 1, 2019

@addaleax

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: nodejs#25315

@addaleax addaleax added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

and removed review wanted

PRs that need reviews.

labels

Nov 4, 2019

addaleax added a commit that referenced this pull request

Nov 5, 2019
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: #25315

PR-URL: #30132
Reviewed-By: Gus Caplan <me@gus.host>

srl295

MylesBorins pushed a commit that referenced this pull request

Nov 17, 2019
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: #25315

PR-URL: #30132
Reviewed-By: Gus Caplan <me@gus.host>

targos pushed a commit that referenced this pull request

Dec 1, 2019
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: #25315

PR-URL: #30132
Reviewed-By: Gus Caplan <me@gus.host>

MylesBorins pushed a commit that referenced this pull request

Dec 17, 2019
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: #25315

PR-URL: #30132
Reviewed-By: Gus Caplan <me@gus.host>