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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With