Fix multi-byte character handling in chat#4
Merged
anf3is merged 2 commits intoreactivedrop_betafrom May 6, 2026
Merged
Conversation
fd6c2a5 to
cafff58
Compare
ec5b2af to
db50376
Compare
fb37bb7 to
c396e2c
Compare
c396e2c to
05d42c7
Compare
Because of the `Send` method, max char limit should be based on utf-8 byte count, not utf-16 chars.
05d42c7 to
cd6a1a8
Compare
Owner
Author
|
Why would github tag issue in main repo 😕 |
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.
Problems
wcharcharacters, but message sending uses utf-8char.wcharand 2–3char.Goals
Do not fix truncation splitting utf-8 graphemesTest strings
Details
Bytes
123…represent110 + nbyte position (counting from 1)|represent string cutoffxrepresent utf-8 code point's byteChars
128 characters (
"Ⓐ"*41+"Ⓑ"*(126-41)+"78"). 300+ bytes.Examples
Details
Before
After