0

I have the same issue as in this question - the unicode characters from a resource file aren't displayed correctly (LTEXT L"żółć", - 1, 5, 5, 80, 10 results in unicode displayed incorrectly). However solutions in the answer to that question don't work for GCC, because 1) utf-16 doesn't work with GCC and 2) there's no #pragma codepage in GCC.

EDIT - minimal reproducible exmaple:
main.cpp

#include <windows.h>
INT_PTR CALLBACK DialogProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
    if(msg == WM_COMMAND && LOWORD(wparam) == IDCANCEL) {
        EndDialog(hwnd, 0);
        return TRUE;
    } else {
        return FALSE;
    }
}
int WINAPI WinMain(HINSTANCE thisInstance, HINSTANCE, LPSTR, int) {
    DialogBox(thisInstance, MAKEINTRESOURCE(123), nullptr, DialogProc);
    return 0;
}

dialog.rc

#include <windows.h>
123 DIALOG 100, 100, 100, 100
STYLE WS_POPUPWINDOW | WS_CAPTION
{
    LTEXT L"żółć", -1, 0, 0, 100, 100
}

michuu
  • 315
  • 4
  • 10
  • 1
    Have the GNU folks fix their tooling then, or stop using them (which is, ultimately, the sane option). – IInspectable Aug 11 '22 at 16:39
  • Please [edit] your question to provide a [mcve]. In particular, do not use images of text; show the text itself… – JosefZ Aug 11 '22 at 19:05
  • I added MRE. As for the text - I couldn't copy it and an image to text donverter didn't work out as there were exotic characters in the text. – michuu Aug 12 '22 at 14:45
  • For a standard dialog (as used in the code) you can press Ctrl+C and have a textual representation of the dialog placed into the clipboard. – IInspectable Aug 13 '22 at 11:46

0 Answers0