From 7b91e0d626083b03dcb779f09108ee2cc5326291 Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Mon, 23 Oct 2023 12:04:49 +0300 Subject: [PATCH] Fixed the encoding of the culture-dependent DNS resolver error messages (Windows) --- Common/Net/Resolve.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/Net/Resolve.cpp b/Common/Net/Resolve.cpp index 2438fc5b33..c8fe425186 100644 --- a/Common/Net/Resolve.cpp +++ b/Common/Net/Resolve.cpp @@ -29,6 +29,7 @@ #include "Common/Log.h" #include "Common/TimeUtil.h" +#include "Common/Data/Encoding/Utf8.h" #ifndef HTTPS_NOT_AVAILABLE #include "ext/naett/naett.h" @@ -109,7 +110,7 @@ bool DNSResolve(const std::string &host, const std::string &service, addrinfo ** if (result != 0) { #ifdef _WIN32 - error = gai_strerrorA(result); + error = ConvertWStringToUTF8(gai_strerror(result)); #else error = gai_strerror(result); #endif