Skip to content

fix(ipc): preserve UTF-8 across socket chunks - #390

Merged
jancurn merged 1 commit into
apify:mainfrom
pacocartones:fix/ipc-streaming-utf8
Sep 10, 2026
Merged

jancurn merged 1 commit into
apify:mainfrom
pacocartones:fix/ipc-streaming-utf8

Conversation

@pacocartones

Copy link
Copy Markdown
Contributor

Summary

  • decode IPC data incrementally per socket connection
  • share the newline framing helper between the bridge and bridge client
  • cover a multibyte UTF-8 code point split across socket chunks

Why

Socket chunk boundaries can split a UTF-8 code point. Decoding each chunk independently replaces the partial bytes before the newline-delimited JSON frame is assembled, silently corrupting string values even though the JSON remains valid.

Validation

  • pnpm lint
  • pnpm build
  • pnpm test:unit — 43 files, 1,081 tests passed

Signed-off-by: Paco Cartones <pacocartones@users.noreply.github.com>
@jancurn
jancurn merged commit e4d14af into apify:main Sep 10, 2026
8 checks passed
jancurn added a commit that referenced this pull request Sep 10, 2026
The IPC UTF-8 fix from #390 is user-visible (accented text, CJK, and
emoji in large tool results were silently replaced with `�`) but merged
without a `CHANGELOG.md` entry, so it would be missing from the next
release notes. This adds the entry under `[Unreleased]` → `Fixed`.
Changelog only, no code changes.

Refs #390

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_0192ixpA4NHu54mZfDhfK49V

---
_Generated by [Claude
Code](https://claude.ai/code/session_0192ixpA4NHu54mZfDhfK49V)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants