TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Add support for Umlauts (UTF8, UTF16, Unicode) for Window-Title #2662

Open Xabyn opened 2 years ago

Xabyn commented 2 years ago

Look at Window-Title, my level name should be "Wüste". but the U-umlaut is not presented correctly

grafik

ZakJudges commented 2 years ago

Hi @Xabyn, thank you for reporting this issue. This has been fixed and will be in the next update. I will reply here when the fix is available for you to test :)

ZakJudges commented 2 years ago

Hi @Xabyn, the fix should be in the most recent update. Could you confirm if it has fixed the issue for you? Thanks :)

rvanner commented 2 years ago

@ZakJudges Not sure if this is fixed, I save a level with the "Wüste" name and see this; image

image

ZakJudges commented 2 years ago

@rvanner Strange, seems to work here: Screenshot 2022-05-11 141741

@LeeBamberTGC Any ideas if there is anything else that I should have done for this? In SetWindowTitle() I converted the window title from multi-byte to wide-char and then called SetWindowTextW() instead of SetWindowText()

rvanner commented 2 years ago

@ZakJudges I copied the text out of the GitHub report above and used it in Save Level As... in the level editor.

ZakJudges commented 2 years ago

@rvanner Ah, I can reproduce it now. I was naming the level from the terrain generator. Thanks

ZakJudges commented 2 years ago

@LeeBamberTGC Wondering if you could take a look at this? :) In SetWindowTitle() I convert the passed in string to wide char with MultiByteToWideChar() which works when creating a level using the Terrain Generator (ImGui dialog). But when you save a level using the "Save Level As" button, you get a windows file dialog. Naming the file "Wüste" results in the passed in string already having the umlaut, and then when MultiByteToWideChar() is called, the umlaut character is replaced with the symbol seen in the above picture. I'm missing something, just can't see what :)

LeeBamberTGC commented 2 years ago

@ZakJudges Nothing leaps out. Give it another 20 minutes of stepping through and experimenting, then assign to me :)