BYTE*/char* to UTF8 using mbstowcs or MultiByteToWideChar?
Posted on 2007-10-05
In a function downloading from the internet I get pieces of the data as char*/BYTE* (doesn't really matter...).
Since this will be used for downloading HTML/XML files too, I need to port convert it to UTF8. I always used MultiByteToWideChar, and I was wondering what exactly is the difference between that and mbstowcs?
Also, what is better - to use that conversion with each piece (65536 buffer), or to pile them up in std::string or whatever and then port it at once to wstring?