utf8_helper.cpp
branchsync
changeset 364 2259aa4c6a64
parent 269 26c8597fe860
child 369 2d02d1fc2218
     1.1 --- a/utf8_helper.cpp	Mon Oct 21 10:56:57 2019 +0200
     1.2 +++ b/utf8_helper.cpp	Tue Oct 22 12:41:11 2019 +0200
     1.3 @@ -30,11 +30,11 @@
     1.4              }
     1.5              string result;
     1.6  
     1.7 -            int size = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, _wstr_normalized.c_str(), -1, NULL, 0, NULL, NULL);
     1.8 +            int size = WideCharToMultiByte(CP_UTF8, WC_NO_BEST_FIT_CHARS, _wstr_normalized.c_str(), -1, NULL, 0, NULL, NULL);
     1.9              assert(size);
    1.10              if (size) {
    1.11                  char *buf = new char[size];
    1.12 -                WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, _wstr_normalized.c_str(), -1, buf, size, NULL, NULL);
    1.13 +                WideCharToMultiByte(CP_UTF8, WC_NO_BEST_FIT_CHARS, _wstr_normalized.c_str(), -1, buf, size, NULL, NULL);
    1.14                  result = buf;
    1.15                  delete[] buf;
    1.16              }