The standard C library provides mbstowcs and wcstombs which probably do everything that is required except using std::string and std::wstring. A std::string to std::wstring function based on mbstowcs would almost certainly be a lot faster than using std::wstringbuffer.
This the wc* and mb* function are required in C11 so should be supported everywhere but don't have any access to MSVC++ to check. A lot of programs use UTF 8 to avoid all the issues around byte order, how many bits fit in a wide character (32 bits in glibc, 16 bits on windows), etc.