Skip to content

fix(lobby): Keep Unicode characters in the saved lobby name - #642

Open
tintinhamans wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/unicode-lobby-name-pref
Open

tintinhamans wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/unicode-lobby-name-pref

Conversation

@tintinhamans

Copy link
Copy Markdown

PopupHostGameSystem kept only the low byte of each character when saving the last lobby name to CustomPref.ini, so anything above U+00FF came back as unrelated Latin-1 characters.

UserPreferences now has getUnicodeString and setUnicodeString, which convert through translate the same way the rest of the engine does. CustomMatchPreferences::getLastLobbyName and setLastLobbyName take a UnicodeString and use them, so PopupHostGame just passes the name through.

A name already saved with characters above U+007F loads wrong once. Saving it again fixes it.

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.

1 participant