Backport Chat Box UTF-8 support to 1.20.1#820
Merged
zyxkad merged 2 commits intoIntelligenceModding:dev/1.20.1from Apr 17, 2026
Merged
Backport Chat Box UTF-8 support to 1.20.1#820zyxkad merged 2 commits intoIntelligenceModding:dev/1.20.1from
zyxkad merged 2 commits intoIntelligenceModding:dev/1.20.1from
Conversation
Contributor
Build PreviewYou can find files attached to the below linked Workflow Run URL (Logs).
|
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.
PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION
What kind of change does this PR introduce? (Bug fix, feature, ...)
Backport / compatibility improvement for Chat Box UTF-8 support on
1.20.1.What is the current behavior? (You can also link to an open issue here)
On
1.20.1, Chat Box UTF-8 behavior is incomplete compared to the already documented API.Messages containing non-ASCII characters may be lost or degraded when sent from Lua, and incoming
chatevents do not expose a UTF-8-safe message payload for scripts.What is the new behavior (if this is a feature change)?
This PR backports the Chat Box UTF-8 behavior from
1.21.1to1.20.1.It adds support for the optional trailing
utf8Supportargument to:sendMessagesendMessageToPlayersendToastToPlayersendFormattedMessagesendFormattedMessageToPlayersendFormattedToastToPlayerIt also extends the emitted
chatevent with:messageUtf8as the 5th payload valueThis keeps old scripts compatible while allowing new scripts to safely work with UTF-8 text.
No.
This PR is intentionally backward compatible:
utf8Supportis optional and only added as the final argumentchatevent fields are preservedOld scripts should continue to work unchanged.
Scripts that want UTF-8-safe input can start reading the new
messageUtf8event value.Tested on
1.20.1with:sendMessagesendMessageToPlayersendToastToPlayersendFormattedMessagesendFormattedMessageToPlayersendFormattedToastToPlayerObserved behavior:
chatevents exposed readable UTF-8 text throughmessageUtf8messagefield remained unchanged for backward compatibilityThis is a focused backport of Chat Box UTF-8 behavior only and does not attempt to backport unrelated
1.21.1changes.