There is a document on the Internet in UTF-8
Trying to get it in UTF-8 with curl
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) { ((std::wstring*)userp)->append((wchar_t*)contents, size * nmemb); return size * nmemb; } ... CURL *curl; CURLcode res; std::wstring readBuffer; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "url"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer); res = curl_easy_perform(curl); curl_easy_cleanup(curl); } int pos = readBuffer.find_first_of(L"World"); breakpoint on readBuffer
and pos
Why don't I get what I need in UTF-8?



wchar_t*and will be happy. ru.stackoverflow.com/questions/839080/… - nick_n_a