Skip to content

TextDecoder does not respect DataView offset and length #4767

@zhuzhu81998

Description

@zhuzhu81998

Similar to #4615 :

const buffer = Uint8Array.of(0x42, 0x42).buffer;

// Create a DataView that starts at byte offset 1
const view = new DataView(buffer, 1);

console.log(new TextDecoder().decode(view));

Expected: B, actual: BB.

Let us handle this after #4766 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions