I need to convert Unicode version of ReadDirectoryChangesW to support multibyte is that possible
A:
You can cast a multi byte string into a unicode string by using this simple method
#include <string>
#include <sstream>
template <typename inputtype>
std::wstring toUTF16String(const inputtype& input)
{
std::wstringstream ss;
ss << input;
return ss.str();
}
You can then use this acquired value in the unicode function.
Chaoz
2009-10-06 19:44:19
Warning: (Assuming that inputtype is std::string or const char*): This converts each char individually, with the widen() method of the global locale's char_traits facet, and is thus unsuitable for any multibyte encoding.
Éric Malenfant
2009-10-06 20:28:52