Skip to content

Investigate our handling of the UTF BOM (byte order mark) #4712

@npaun

Description

@npaun

The following tests in fetch/api/basic/text-utf8.any.js complain that we don't handle the BOM when calling .text().

  • UTF-8 with BOM with Request.text()
  • UTF-8 with BOM with Response.text()
  • UTF-8 with BOM with fetched data (UTF-8 charset)
  • UTF-8 with BOM with fetched data (UTF-16 charset)

We could probably just patch TextDecoder but we need to know some things:

  1. How many requests/responses do we even have that have BOMs? We should have some logging.
  2. Do we need a compat flag to fix this?

This is very low priority.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions