Skip to content

fix(utils): preserve supplementary characters when wrapping memos - #1524

Open
zakazaka95 wants to merge 1 commit into
solana-foundation:masterfrom
zakazaka95:fix/unicode-memo-wrapping
Open

zakazaka95 wants to merge 1 commit into
solana-foundation:masterfrom
zakazaka95:fix/unicode-memo-wrapping

Conversation

@zakazaka95

Copy link
Copy Markdown

Description

Memo text displays replacement characters when a supplementary Unicode character crosses a wrapping boundary. A memo with 49 ASCII characters followed by an emoji places the newline between the emoji's UTF-16 surrogate halves. The memo should retain the complete character on one line. ASCII instruction-byte wrapping retains the same output.

Type of change

  • Bug fix

Screenshots

N/A: string-formatting helper; no layout or protocol integration added.

Testing

  • The regression suite fails on the base revision for emoji and supplementary-plane characters at a line boundary (3 failures, 1 pass).
  • 22 tests across the wrapping and adjacent amount/separator utility suites pass with the fix.
  • ESLint passes for both changed files; git diff --check passes.
  • The full local pnpm check stops in the Markdown formatting step because Windows preserves the quoted glob. A separate formatter invocation also fails on the unchanged Tailwind configuration (missing tailwindcss/theme.css).
  • The full application typecheck reports unresolved unbuilt workspace packages. Full build, typecheck and test success are not claimed.
  • Local Node is 24.14.0; the repository requests ^24.22.1.

Related Issues

N/A.

Checklist

  • My code follows the project's style guidelines
  • I have added tests that prove my fix/feature works
  • All checks pass locally (limitations above)
  • I have updated documentation as needed (no public API changes)
  • I have run build:info script to update build information
  • CI/CD checks pass on the PR
  • Screenshots included — required for protocol screens, recommended for other UI changes
  • For security-related features, I have included links to related information

Additional Notes

Review should wait for the required CI pipeline to pass.

@vercel

vercel Bot commented Nov 28, 2026

Copy link
Copy Markdown

@zakazaka95 is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Updates wrap to keep supplementary Unicode characters intact at line boundaries.

  • Wrapped memo text keeps emoji intact at line breaks.

No actionable issues found. Tests and application checks were not run during this review.

Reviews (2) · Last reviewed commit: "fix(utils): preserve supplementary chara..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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.

1 participant