Lets say I have a std::string, but the data is encoded in UTF-16.
How could I copy that data into a std::wstring, not modifying the data at all?
Also, I can’t just use std::wstring because I’m retrieving a text file online and checking the Content-Type header field to determine encoding. But using std::string to receive the data.
1 Answer