a Foo walks into a bar...
Highlights
- Pro
Pinned Loading
-
-
-
-
Encoding Conversion In C++
Encoding Conversion In C++ 1// Convert a wide Unicode string to an UTF8 string
2std::string utf8_encode(const std::wstring &wstr)
3{
4int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL);
5std::string strTo(size_needed, 0);
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.