diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index 484ac1fc97..7dc6b7cf1b 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -238,24 +238,6 @@ std::string cmCurlFixFileURL(std::string url) // Explicitly encode spaces for a URL. cmSystemTools::ReplaceString(url, " ", "%20"); -#if defined(_WIN32) - // libcurl doesn't support file:// urls for unicode filenames on Windows. - // Convert string from UTF-8 to ACP if this is a file:// URL. - std::wstring wurl = cmsys::Encoding::ToWide(url); - if (!wurl.empty()) { - int mblen = WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, nullptr, 0, - nullptr, nullptr); - if (mblen > 0) { - std::vector chars(mblen); - mblen = WideCharToMultiByte(CP_ACP, 0, wurl.c_str(), -1, &chars[0], - mblen, nullptr, nullptr); - if (mblen > 0) { - url = &chars[0]; - } - } - } -#endif - return url; } diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 0b4b558716..2c6a6e6a19 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -82,7 +82,7 @@ set(ENABLE_CURLDEBUG OFF CACHE INTERNAL "No curl TrackMemory features") set(ENABLE_DEBUG OFF CACHE INTERNAL "No curl debug features") set(ENABLE_IPV6 ON CACHE INTERNAL "Enable curl IPv6 support detection") set(ENABLE_THREADED_RESOLVER OFF CACHE INTERNAL "No curl POSIX threaded DNS lookup") -set(ENABLE_UNICODE OFF) +set(ENABLE_UNICODE ON) set(ENABLE_UNIX_SOCKETS OFF CACHE INTERNAL "No curl Unix domain sockets support") set(HAVE_ATOMIC 0) set(HAVE_BORINGSSL 0) # we do not need this info