From f25863f3b90679cfcc77bdf1576a1b1a14783678 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 4 Oct 2020 12:42:35 +0300 Subject: for UTF-8, only WC_ERR_INVALID_CHARS is supported --- src/convert.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/convert.cpp b/src/convert.cpp index 33b3222..303ead2 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -33,7 +33,7 @@ std::wstring widen(const std::vector& src) { } std::wstring widen(const void* src, std::size_t in_nb) { - const DWORD flags = MB_ERR_INVALID_CHARS | MB_PRECOMPOSED; + const DWORD flags = MB_ERR_INVALID_CHARS; const char* in_data = reinterpret_cast(src); @@ -74,7 +74,7 @@ std::string narrow(const void* src, std::size_t in_nb) { const std::size_t in_nch = in_nb / sizeof(WCHAR); - const DWORD flags = WC_ERR_INVALID_CHARS | WC_NO_BEST_FIT_CHARS; + const DWORD flags = WC_ERR_INVALID_CHARS; const wchar_t* in_data = reinterpret_cast(src); -- cgit v1.2.3