MBCS to UTF-8 C++
c++, unicode, utf-8
Solution
Convert the MBCS string to Unicode using `MultiByteToWideChar` and then to UTF-8 with `WideCharToMultiByte`. Pass `CP_ACP` to the first call and `CP_UTF8` to the second.
Problem
I'm working on a project in VS2008 that I'm compiling in MBCS but I need to work with some UTF-8 strings to interact with some web services. I wrote a function that works perfectly with Unicode but not MBCS. Is there any way I can convert a MBCS string to UTF-8 or to Unicode? Thanks!