I am trying to convert a C++ std::string to UTF-8 or std::wstring without losing information (consider a string that contains non-ASCII characters).
According to http://forums.sun.com/thread.jspa?threadID=486770&forumID=31:
If the std::string has non-ASCII characters, you must provide a function that converts from your encoding to UTF-8 [...]
What encoding does std::string.c_str() use? How can I convert it to UTF-8 or std::wstring in a cross-platform fashion?