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
This commit is contained in:
Vadim Zeitlin
2014-01-20 14:44:50 +00:00
parent ddd761f2d9
commit a81511317b

View File

@@ -214,7 +214,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
if ( pHostEnt )
{
host = wxString::FromAscii(pHostEnt->h_name);
host = pHostEnt->h_name;
}
}
}