Node: TextDecoder should not output BOM

Created on 2 Jan 2019  路  4Comments  路  Source: nodejs/node

Found when porting encoding WPT into core.

Spec: https://encoding.spec.whatwg.org/#concept-td-serialize

If encoding is UTF-8, UTF-16BE, or UTF-16LE, and ignore BOM flag and BOM seen flag are unset, then:

  • If token is U+FEFF, then set BOM seen flag.
  • Otherwise, if token is not end-of-stream, then set BOM seen flag and append token to output.
  • Otherwise, return output.

Failing tests:

confirmed-bug encoding

Most helpful comment

PR was merged, but the bug still exists. Both failing tests are skipped: https://github.com/nodejs/node/blob/7c9ee6dd88cc2908a3db70eba9c15eddd1112c50/test/wpt/status/encoding.json#L24-L29

All 4 comments

cc @nodejs/i18n

Sorry, pinged the wrong team @nodejs/intl

PR merged, should be close.

PR was merged, but the bug still exists. Both failing tests are skipped: https://github.com/nodejs/node/blob/7c9ee6dd88cc2908a3db70eba9c15eddd1112c50/test/wpt/status/encoding.json#L24-L29

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcollina picture mcollina  路  3Comments

danielstaleiny picture danielstaleiny  路  3Comments

dfahlander picture dfahlander  路  3Comments

jmichae3 picture jmichae3  路  3Comments

akdor1154 picture akdor1154  路  3Comments