From a81511317be06c6c94fef8c0111438e6629a8dac Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Jan 2014 14:44:50 +0000 Subject: [PATCH] Deal correctly with non-ASCII hostnames in wxGetFullHostName() in wxMSW. Somewhat surprisingly, Windows can return a non-ASCII string from gethostname(). It's not really clear what happens if the host name is not representable in the current locale encoding at all, but at least make the function work in case it is. Closes #15875. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 59adbbe3cc..07fe32b9c9 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -214,7 +214,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize) if ( pHostEnt ) { - host = wxString::FromAscii(pHostEnt->h_name); + host = pHostEnt->h_name; } } }