You need a library that can encode/decode UTF8. Unfortunately, this functionality isn't included with the std c++ library. Here's one library you might use: http://utfcpp.sourceforge.net/
Here's an example use of it:
utf8::utf8to32(bytes.begin(), bytes.end(), std::back_inserter(wstr));