Repository navigation
fix: preserve leading U+FEFF when decoding strings - #5589
Closed
mortezashojaei wants to merge 1 commit into
Closed
mortezashojaei wants to merge 1 commit into
mortezashojaei wants to merge 1 commit into
Conversation
|
@mortezashojaei is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: a7d5c8d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
mortezashojaei
marked this pull request as ready for review
November 18, 2026 21:27
Member
|
Thanks @mortezashojaei, this is a real data-loss fix! I've carried your commit forward in #5590 with small test and changeset follow-ups, so I'm closing this in favor of it. |
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.
Decoding UTF-8 beginning with
ef bb bfcurrently drops the first U+FEFF:hexToString('0xefbbbf68656c6c6f')returns'hello'instead of'\uFEFFhello'. ABI string round trips lose the same character.Configure the three lazy, reused decoders in
decodeAbiParameters,hexToString, andbytesToStringwithignoreBOM: true. This preserves U+FEFF as string content without changing padding, size checks, or malformed-UTF-8 replacement. Includes colocated regressions and a patch changeset. #4844 is a related data-preservation precedent with a different cause.Validation against main
4febd2254b53b9ebd692b1c7ed38e42558d3489c:tsc -p src/tsconfig.json(TypeScript 7.0.2), Biome 2.2.4 check on all six changed TypeScript files, andgit diff --check: passed.fast-check/prool, and one RPC-dependent test times out. The same four failures reproduce on unchanged source.Draft pending normal workspace validation: the pinned pnpm 12.16.1 is unavailable from the registry. With the fallback harness, the repository test script cannot load
prool, andpnpm check:typesis blocked by missing workspace dependencies (including Bun types and Vocs). The external config uses source aliases and error formatting setup, without blockchain setup; these results do not establish full CI success. Package metadata and the lockfile are unchanged.Compatibility: callers that relied on stripping an initial U+FEFF will now receive that character.