Correctly open URLs with non-ASCII characters on Windows.

Fixes #1023
This commit is contained in:
Arnavion 2014-09-07 17:11:14 -07:00
parent 80bdd9ce11
commit ad2300f236

View File

@ -1042,7 +1042,16 @@ static void
fe_open_url_inner (const char *url) fe_open_url_inner (const char *url)
{ {
#ifdef WIN32 #ifdef WIN32
ShellExecute (0, "open", url, NULL, NULL, SW_SHOWNORMAL); gunichar2 *url_utf16 = g_utf8_to_utf16 (url, -1, NULL, NULL, NULL);
if (url_utf16 == NULL)
{
return;
}
ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL);
g_free (url_utf16);
#elif defined(__APPLE__) #elif defined(__APPLE__)
osx_show_uri (url); osx_show_uri (url);
#else #else