I have troubles with wide string literals using MinGW GCC compiler on Windows.
When I read the user input using wscanf
, wprintf
outputs correct national characters. However wide string literals stops output at the first national character:
wprintf (L"China - Čína"); // outputs "China - "
Assuming the wchar_t is encoded as UTF-16 by default (is it LE or BE?), how does it work when the source is UTF-8 file? I tried to save the source as UTF-16, but I get illegal byte sequence error.