Skip to content

Fix TextDecoder to respect DataView byteOffset and byteLength#4815

Closed
shreyadesai20042009 wants to merge 9 commits into
boa-dev:mainfrom
shreyadesai20042009:fix-textdecoder-dataview
Closed

Fix TextDecoder to respect DataView byteOffset and byteLength#4815
shreyadesai20042009 wants to merge 9 commits into
boa-dev:mainfrom
shreyadesai20042009:fix-textdecoder-dataview

Conversation

@shreyadesai20042009

Copy link
Copy Markdown

Fixes #4767

This change ensures that TextDecoder.decode correctly respects
the byteOffset and byteLength of DataView objects.

Previously, DataView inputs were decoded using the full
underlying ArrayBuffer instead of the specified view range.

Now the decoder properly slices the buffer before decoding.

@zhuzhu81998 zhuzhu81998 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to wait until #4787 is merged.

));
JsArrayBuffer::from_object(obj)?
}
// ✅ FIXED: Handle DataView properly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like ai

@jedel1043 jedel1043 closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextDecoder does not respect DataView offset and length

3 participants