I'm trying to convert wstring to string and tried the below code:
std::wstring_convert<std::codecvt_utf16<wchar_t>, wchar_t> utf8convertor;
std::string str = utf8convertor.to_bytes(utf16str);
My input is "Doc 01". But I get the output as " D o c 0 1".
Any help on what I'm doing wrongly