diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-04 12:42:35 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-04 12:42:35 +0300 |
commit | f25863f3b90679cfcc77bdf1576a1b1a14783678 (patch) | |
tree | 3a1d6c15d13c05be036b32529250e159f8420176 /src/convert.cpp | |
parent | AppVeyor: disable VS 2017 builds for now also (diff) | |
download | winapi-utf8-f25863f3b90679cfcc77bdf1576a1b1a14783678.tar.gz winapi-utf8-f25863f3b90679cfcc77bdf1576a1b1a14783678.zip |
for UTF-8, only WC_ERR_INVALID_CHARS is supported
Diffstat (limited to 'src/convert.cpp')
-rw-r--r-- | src/convert.cpp | 4 |
1 files 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<unsigned char>& 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<const char*>(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<const wchar_t*>(src); |