Skip to content

Conversation

@ybalbert
Copy link
Contributor

@ybalbert ybalbert commented Jan 14, 2026

This change is to prevent an error that a multi-bytes UTF-8 character gets split across multiple chunks and fails to decode. The error could happen when pasting a long paragraph without whitespace in language like Chinese:

called `Result::unwrap()` on an `Err` value: Utf8Error

Tested by building a local docker image. The error doesn't happen any more on the same content.

Refactor content handling to use BytesMut to avoid splitting multi-bytes UTF-8 across two chunks.
Refactor content handling to use a buffer to prevent UTF-8 parsing error.
@szabodanika szabodanika self-requested a review January 15, 2026 09:35
@szabodanika
Copy link
Owner

Thanks @ybalbert ! Can you provide an example string to test this with?

@ybalbert
Copy link
Contributor Author

Sure, here's the pasta (expires in 6 days) I used for testing.

@szabodanika szabodanika merged commit d44d15f into szabodanika:master Jan 24, 2026
3 checks passed
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.

2 participants