Is there a standard way (ie. apart from using something like WideCharToMultiByte()) to convert between string, wstring, and unicode strings? <cstdlib>, <cwchar>, and <cuchar> have a number of functions that seem like they might be designed for that purpose, but don't explicitly say it, so I'm unsure as to exactly what they are converting to/from.
That post was an interesting starting point, but in the end proved fruitless. Either they are using the Windows API functions (ie. WideCharToMultiByte(), etc...), or they suggest using codecvt.
So I'm rather confused at this point as to what the 'official' way to convert between string, wstring, and the unicode strings is supposed to be. I've written utf8, utf16, and utf32 conversion routines, this is easy as their encoding doesn't depend on local information. But string and wstring do depend on local encoding and can/do change significantly depending on compiler/platform...