summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorArnavion <arnavion@gmail.com>2014-09-07 17:11:14 -0700
committerArnavion <arnavion@gmail.com>2014-09-13 00:22:48 -0700
commitad2300f2365e4499fb559c80a6c313d82e8c36d6 (patch)
tree4f8cb5f26d8fbbacdb37c58de77dd3f7da6ad1a9 /src
parent80bdd9ce114af6a6e42a20bef725bdc3dae52cf9 (diff)
Correctly open URLs with non-ASCII characters on Windows.
Fixes #1023
Diffstat (limited to 'src')
-rw-r--r--src/fe-gtk/fe-gtk.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index 004068af..3c97a904 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -1042,7 +1042,16 @@ static void
 fe_open_url_inner (const char *url)
 {
 #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__)
     osx_show_uri (url);
 #else