Fix multi-byte character handling in chat#1039
Open
anf3is wants to merge 2 commits intoReactiveDrop:reactivedrop_betafrom
Open
Fix multi-byte character handling in chat#1039anf3is wants to merge 2 commits intoReactiveDrop:reactivedrop_betafrom
anf3is wants to merge 2 commits intoReactiveDrop:reactivedrop_betafrom
Conversation
Because of the `Send` method, max char limit should be based on utf-8 byte count, not utf-16 chars.
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.
Related to #855
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