Open e1e5en-gd opened 2 years ago
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
);
When changing the window title (function![image](https://user-images.githubusercontent.com/7114353/151776794-9cd34456-1f9e-44b2-86b6-6a1d53256ed0.png)
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.