Skip to content

fix(ext/web): handle empty TextDecoder input when stream is true - #31691

Merged
crowlKats merged 13 commits into
denoland:mainfrom
mertcanaltin:mert/fix/textdecoder-stream-empty-chunk
Jan 12, 2026
Merged

crowlKats merged 13 commits into
denoland:mainfrom
mertcanaltin:mert/fix/textdecoder-stream-empty-chunk

Conversation

@mertcanaltin

@mertcanaltin mertcanaltin commented Dec 20, 2025 •

Copy link
Copy Markdown
Contributor

for:
#31605 (comment)

fixes the issue where TextDecoder with stream: true and an empty chunk would return incorrect results.
It resolves the chunking problem for legacy encodings like big5, shift_jis, and euc-kr.

@mertcanaltin
mertcanaltin force-pushed the mert/fix/textdecoder-stream-empty-chunk branch from de28040 to 7f39652 Compare December 20, 2025 10:57
Comment thread tests/unit_node/textdecoder_stream_empty_chunk_test.ts Outdated
Comment thread ext/web/08_text_encoding.js Outdated
Comment thread tests/unit_node/textdecoder_stream_empty_chunk_test.ts Outdated
Comment thread tests/unit_node/textdecoder_stream_empty_chunk_test.ts Outdated
@bartlomieju bartlomieju changed the title fix(textdecoder): handle empty input when stream is true fix(ext/web): handle empty TextDecoder input when stream is true Jan 7, 2026
@bartlomieju

Copy link
Copy Markdown
Member

@mertcanaltin looks like the tests you added are failing

@mertcanaltin

Copy link
Copy Markdown
Contributor Author

@mertcanaltin looks like the tests you added are failing

thanks for review, I edited now

@crowlKats crowlKats left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@crowlKats
crowlKats merged commit 210b309 into denoland:main Jan 12, 2026
19 checks passed
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.

4 participants