unicode: don't specify MB_PRECOMPOSED for UTF-7&8

MultiByteToWideChar returns ERROR_INVALID_FLAGS on pre Windows 10.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2024-02-12 13:02:06 +01:00
parent fb6ac904af
commit 82a0ea69f9

View File

@ -181,7 +181,7 @@ namespace stdex
return;
#ifdef _WIN32
constexpr DWORD dwFlagsMBWC = MB_PRECOMPOSED;
DWORD dwFlagsMBWC = static_cast<UINT>(m_from_wincp) < CP_UTF7 ? MB_PRECOMPOSED : 0;
constexpr DWORD dwFlagsWCMB = 0;
constexpr LPCCH lpDefaultChar = NULL;