Repository navigation
doc: clarify how StringDecoder.end() handles incomplete input - #67760
cleissonom wants to merge 1 commit into
Conversation
Signed-off-by: Cleisson Moura <cleissonconstc@gmail.com> Assisted-by: Codex
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. Caution AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context. |
|
The recommendations in: advise you should tackle only one issue at a time and that you should not open any new PRs until your first PR has been approved. You opened 2 PRs at exactly the same time. The other PR is #67759. To stay within the guidelines, you may de-prioritize this PR or other open PRs by setting them to draft status. Until the first PR has been approved and has landed in the Waiting until the first PR has landed ensures that you as a contributor have experienced the complete process from PR submission to successful landing. After this has been completed, any new PRs or new commits to an existing PR are treated to rules for regular Contributors. GitHub Actions CI workflows are then run automatically without intervention by a team member. |
|
Thanks for explaining how it works for first-time contributors, Mike! I moved #67759 to draft. I’ll wait until this PR (#67760) is merged before marking the other one ready for review again. Thanks for the quick reply, @MikeMcC399! |
The documentation for
StringDecoder.end()states that incomplete UTF-8 and UTF-16 characters are replaced with substitution characters. However, UTF-16LE behaves differently.This PR clarifies that an incomplete UTF-8 sequence produces the replacement character (
U+FFFD). For UTF-16LE, the decoder discards a trailing byte that cannot form a complete code unit and returns an unpaired high surrogate as a single code unit. Decoder implementation · Existing testsThis is a documentation-only change. The four StringDecoder test files and the documentation build, lint, and four doctool tests passed locally using Node.js v26.13.0.
I used Codex to help investigate the behavior and prepare the documentation change. I reviewed the patch and ran local checks.