Skip to content

fix:enhance write method to handle incomplete UTF-8 sequences.#4732

Open
leozhang2018 wants to merge 1 commit into
mainfrom
exec-input
Open

fix:enhance write method to handle incomplete UTF-8 sequences.#4732
leozhang2018 wants to merge 1 commit into
mainfrom
exec-input

Conversation

@leozhang2018

@leozhang2018 leozhang2018 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

What this PR does / Why we need it:

fix: enhance pod exec terminal output handling to preserve incomplete UTF-8 sequences across writes.

Container output may be split at arbitrary byte boundaries. When a multi-byte UTF-8 character, such as Chinese input echo, was split across Write() calls, the previous implementation could JSON-encode an incomplete sequence and corrupt the terminal output. This PR buffers incomplete UTF-8 tails and sends them only after the full character is available.

Does this PR introduce a user-facing change?

  • API change
  • database schema change
  • upgrade assistant change
  • change in non-functional attributes such as efficiency or availability
  • fix of a previous issue

This change is Reviewable

Signed-off-by: leozhang2018 <leozhang2018@gmail.com>
@leozhang2018 leozhang2018 added the bug Something isn't working label Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant