How to convert a std::wstring to a std::string without losing Polish characters (ąęźćżłó)?
std::string readControlText(HWND window)
{
wchar_t buf[1024];
GetWindowText(window, buf, 1024);
std::wstring tmp(buf);
return std::string(tmp.begin(), tmp.end());
}
I need std::string for communicating with my server.