3 ms·
> wchar_t (typically UTF-16) Complicating supporting multiple compilers in one code base, sizeof(wchar_t) is 2 bytes in MSVC (UTF-16) and 4 bytes in gcc (UTF-3
by cpeterso 3y ago
> wchar_t (typically UTF-16)
Complicating supporting multiple compilers in one code base, sizeof(wchar_t) is 2 bytes in MSVC (UTF-16) and 4 bytes in gcc (UTF-32).
- ordu 3y agoMSVC isn't used on Unix, is it? It is probably not a concern for them, because they do not support Windows anyway.
- cpeterso 3y agoTrue, AFAIK, but plenty of cross-platform software supports MSVC for compiling on Windows and clang and gcc for other platforms.
- kryptiskt 3y agoIt's 16 bits on mingw GCC on windows, as that also uses the Microsoft libc. I hesitate to say that it's UTF-16 as it's entirely up to the app to use the type properly.