TextDecoder should not output BOM

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Closed

@joyeecheung

Description

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions