Skip to content
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

[3.x] Implement limited surrogate pairs support for platforms with 16-bit wchar_t. #54625

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Nov 5, 2021

Fixes #54617
Fixes #23093

Bugsquad edit: Fixes #52698

Adds support for serializing/deserializing from/to UTF-8 and displaying characters in the U+10000 - U+10FFFF on Windows.

Screenshot 2021-11-05 at 13 27 12

No changes to the public scripting / add-on APIs.

Limitations:

  • In the input controls, surrogates will act as separate characters (can be selected and deleted individually).
  • All string functions also work with surrogates as separate characters.
  • 3.x UTF-8 encoder/decoder can parse character above U+10FFFF, which are invalid Unicode characters and can't be encoded as surrogate, these characters are replaced with space as before.
  • No kerning support for character encoded as surrogates.

Note: Text with the U+10000 - U+10FFFF characters in the existing projects created on Windows should be re-entered, since it was incorrectly encoded, existing projects created on other platforms should work on Windows without any changes.
It should be enough to open, save and reopen a scene with the incorrectly encoded surrogates on any platform to fix it.

@bruvzg bruvzg added this to the 3.5 milestone Nov 5, 2021
@bruvzg bruvzg changed the title Implement limited surrogate pairs support for platforms with 16-bit wchar_t. [3.x] Implement limited surrogate pairs support for platforms with 16-bit wchar_t. Nov 5, 2021
@bruvzg bruvzg marked this pull request as ready for review November 6, 2021 09:56
@bruvzg bruvzg requested review from a team as code owners November 6, 2021 09:56
@akien-mga akien-mga merged commit f9174d1 into godotengine:3.x Nov 8, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants