defos
defos copied to clipboard
Changing the window title
When changing the window title (function defos.set_window_title) using Cyrillic, as a result, we get incorrect characters.
Sample project: title_window_issue.zip
Screenshot:

An example fix in the Defold engine: link.
Strange, I would have thought that CA2W which is used in DefOS would work out of the box:
https://github.com/subsoap/defos/blob/master/defos/src/defos_win.cpp#L251
What you can try is like you suggested and instead use MultiByteToWideChar, like we do in Defold.
As discussed on #127 and in Discord there is still a problem somehow so reopening.
I'll add a message from Discord: If you do not pay attention to character transformations, then the task of the value in the window title occurs with errors:
SetWindowTextW(dmGraphics::GetNativeWindowsHWND(), (LPCWSTR)L"我使用 - Defos - Привет, мир!");
MessageBoxW(
dmGraphics::GetNativeWindowsHWND(),
(LPCWSTR)L"我使用 - Defos - Привет, мир!",
(LPCWSTR)L"出去 - Out - Вывод",
MB_ICONINFORMATION | MB_OK | MB_DEFBUTTON1
);
