Repository navigation
fix(node:buffer): support utf16le search encoding - #2292
Merged
proggeramlug merged 1 commit intoMay 28, 2026
Merged
proggeramlug merged 1 commit into
proggeramlug merged 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #793.
Summary:
utf16le,utf-16le,ucs2, anducs-2in static Buffer encoding folding and runtime encoding parsing.Buffer.from(string, encoding)UTF-16LE aliases as little-endian UTF-16 byte pairs.buf.toString(encoding)UTF-16LE aliases and reuse the same string-to-bytes path for Buffer search string needles.Verification:
reference/deepwiki/nodejs-node-buffer-utf16le-search-encoding-2026-05-28.md.node-suite/buffer/search/ucs2-and-buffer-needle: COMPILE FAIL, reporttest-parity/reports/parity_report_20260528_122044.json.node-suite/buffer/search/ucs2-and-buffer-needle: PASS, reporttest-parity/reports/parity_report_20260528_122510.json.node-suite/buffer/search: PASS 7/7, reporttest-parity/reports/parity_report_20260528_122551.json.node-suite/buffer: 104 PASS / 12 parity FAIL / 0 compile FAIL, reporttest-parity/reports/parity_report_20260528_122604.json; target is green and the prior compile residual is gone.cargo check -p perry-runtime -p perry-stdlib -p perry-codegen: PASS with existing warnings.cargo fmt --check,jq empty test-parity/known_failures.json, andgit diff --check: PASS.Non-goals:
buf.write(..., "utf16le")implementation.