Skip to content

add utf8 message support to chatboxes #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 6, 2025

Conversation

456dev
Copy link
Contributor

@456dev 456dev commented Jun 30, 2025

adds optional "useUtf8" parameter, informing us that the program is utf8 aware, providing its strings as utf8, This allows sending messages in the extended minecraft character set.

see the utf8 lib in cc, as well as the \u{xxxx} escape sequence.

also sends the events with a new utf8 message parameter.

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

  • Please check if the PR fulfills these requirements
  • The commit message are well described
  • Docs have been added / updated (for features or maybe bugs which were noted). If not, please update the needed documentation here. Feel free to remove this check if you don't need it (will todo tmr)
  • All changes have fully been tested (TODO, test other functions, formatted/toast)
  • What kind of change does this PR introduce? (Bug fix, feature, ...)
    Feature

  • What is the current behavior? (You can also link to an open issue here)
    image

  • What is the new behavior (if this is a feature change)?
    image

utf8 message is provided as argument 5 (the current last one)

  • Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)
    NO: this behaviour is opt in as a default-false optional parameter to all messagebox methods.
    if users with to take advantage of this behaviour when sending messages, they should set the (current) last parameter to true
    unless they are relying on specific parameter counts / not having extra data in the event, but thats not a breaking change for 99%, just 1 case of spacebar heating

adds optional "useUtf8" parameter, informing us that the program is utf8 aware, providing its strings as utf8,
This allows sending messages in the extended minecraft character set.

see the utf8 lib in cc, as well as the \u{xxxx} escape sequence.

also sends the events with a new utf8 message parameter.
@SirEndii
Copy link
Member

Greetings
Would you be able to port that to the dev/1.19.2 branch too?

Apart from that, I will try to review your PR asap

Copy link
Contributor

github-actions bot commented Jun 30, 2025

Build Preview

badge

You can find files attached to the below linked Workflow Run URL (Logs).

Name Link
Commit 20c131c
Logs https://github.com/IntelligenceModding/AdvancedPeripherals/actions/runs/15998141035
Jar Files AdvancedPeripherals PR 757
Expires At 2025-09-29T11:36:57Z

456dev added a commit to 456dev/AdvancedPeripherals that referenced this pull request Jul 1, 2025
adds optional "useUtf8" parameter, informing us that the program is utf8 aware, providing its strings as utf8,
This allows sending messages in the extended minecraft character set.

see the utf8 lib in cc, as well as the \u{xxxx} escape sequence.

also sends the events with a new utf8 message parameter.

This is a backport from IntelligenceModding#757
@SirEndii SirEndii merged commit 901781a into IntelligenceModding:dev/1.21.1 Jul 6, 2025
4 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