How to decode an URI with UTF-8 characters in C++
问题 I need to decode an URI in C++. I found several questions about it, but they all fail to deal with UTF-8 encoding and accents (I'm interested in accurately dealing with ASCII characters). Then, I went with a broadly used library like libcurl... but it also failed to address the UTF-8 encoding. Here's what I'm doing string UriHelper::Decode(const string &encoded) { CURL *curl = curl_easy_init(); int outlength; char *cres = curl_easy_unescape(curl, encoded.c_str(), encoded.length(), &outlength)