Hello!
I'm writing an application, and I'm currently using libcurl. The libcurl callback function works fine when I implement it for the Ansi charset, but I fail to get it working when working with Unicode characters.
int CURLConnectorAnsi::BufferWriter(char* data, size_t size, size_t nmemb, std::string* buffer)
{
int ReadBytes = 0;
if (buffer != NULL)
{
buffer->append(data, size * nmemb);
ReadBytes = size * nmemb;
}
return ReadBytes;
}
This snippet works fine, and returns the contents of the website that I website that I've read. Does anyone know how I can pass the data correctly into a wstring instead of a string?
EDIT: I'm trying to manage to get the data in a correct wchar_t* buffer instead (first parameter which is a void* according to curl) of the character buffer, I don't want to know how to add Ansi data into a Unicode buffer.
Thanks!