std::wstring AnsiToWstring(const std::string& input, DWORD locale = CP_UTF8)
{
wchar_t buf[8192] = { 0 };
MultiByteToWideChar(locale, 0, input.c_str(), (int)input.length(), buf, ARRAYSIZE(buf));
return buf;
}
std::string WstringToAnsi(const std::wstring& input, DWORD locale = 1251)
{
char buf[8192] = { 0 };
WideCharToMultiByte(locale, 0, input.c_str(), (int)input.length(), buf, ARRAYSIZE(buf), nullptr, nullptr);
return buf;
}
std::wstring nik = AnsiToWstring(pEntity->GetName());
Print("%s", WstringToAnsi(nik).c_str());