Migrate window class registration and window creation to Unicode APIs#1468
Merged
sylvessa merged 1 commit intoMCLCE:mainfrom Apr 6, 2026
Merged
Migrate window class registration and window creation to Unicode APIs#1468sylvessa merged 1 commit intoMCLCE:mainfrom
sylvessa merged 1 commit intoMCLCE:mainfrom
Conversation
sylvessa
reviewed
Apr 5, 2026
| wcex.lpszClassName = "MinecraftClass"; | ||
| wcex.lpszMenuName = L"Minecraft"; | ||
| wcex.lpszClassName = L"MinecraftClass"; | ||
| wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_MINECRAFTWINDOWS)); |
Contributor
There was a problem hiding this comment.
wouldnt we want to make this LoadIconW too?
Contributor
Author
There was a problem hiding this comment.
wouldnt we want to make this LoadIconW too?
There will be no difference between ANSI and Unicode API in this case.
Contributor
There was a problem hiding this comment.
fair. just asked cause consistency
itsRevela
added a commit
to itsRevela/LCE-Revelations
that referenced
this pull request
Apr 11, 2026
Reviewed 8 upstream commits from smartcmd/MCLCE/MinecraftConsoles and recorded the result as a merge so GitHub stops reporting "behind upstream". All accepted changes were cherry-picked earlier in this branch, and this commit only absorbs the upstream commit SHAs as reachable ancestors using the "ours" merge strategy, so no tree changes come in from this commit itself. Applied: - 98a86fc feat: set intro scene background to white (MCLCE#1474) - 413baac fix: reorder autosave tick to account for weak hardware (MCLCE#1482) - d25b762 Fix _jeb easter egg on sheep (MCLCE#1488) Partially applied: - d0786f9 Update more references to old smartcmd repo (credits reorganization and Star History URL applied, Nightly download URLs dropped since our fork has its own release pipeline, itsRevela added to Project Maintainers on top of upstream's restructure) Already present: - b928351 Update Windows64_Minecraft.cpp (MCLCE#1468). Unicode WinAPI conversion was already applied during our Linux cross-compile work, so this was a no-op cherry-pick.
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.
Description
Migrate window class registration and window creation from ANSI (RegisterClassA / CreateWindowA) to Unicode (RegisterClassW / CreateWindowW) APIs. This ensures proper handling of non-ASCII characters in text input.
Previous Behavior
Window class and windows were created using ANSI APIs.
WM_CHAR messages delivered characters encoded in the system code page, leading to incorrect display of non-ASCII text (e.g., Cyrillic, accented characters).
Root Cause
The use of ANSI APIs meant that character data was limited to the system code page. Non-ASCII input could not be represented correctly, resulting in garbage characters in text fields.
New Behavior
Window class registration and window creation now use Unicode APIs.
WM_CHAR messages now provide correct UTF-16 codepoints.
Non-ASCII characters are properly entered and displayed in text fields.
Fix Implementation
Replaced RegisterClassA with RegisterClassW and updated WNDCLASS/WNDCLASSEX structures to use wide-character strings.
Replaced CreateWindowA with CreateWindowW and ensured all string parameters are UTF-16 (L"...") literals.
Note: This will NOT solve the problem of entering Chinese and other characters; they simply aren't in the font. For that, we need to implement a fallback to GNU Unifont.
Note2: This is a remake of the request https://github.com/smartcmd/MinecraftConsoles/pull/950
Screenshot