[Github-comments] [geany/geany] Do not convert filename when opening files from command line on Windows (#2660)

Colomban Wendling notifications at xxxxx
Mon Nov 16 11:05:39 UTC 2020


I did NOT test this and it's not the best solution, but given the mess about encodings we have all around, it might be the easiest solution.  So, does something like this help?
```diff
diff --git a/src/libmain.c b/src/libmain.c
index f1fdb41ef..51c51d342 100644
--- a/src/libmain.c
+++ b/src/libmain.c
@@ -329,6 +329,9 @@ gchar *main_get_argv_filename(const gchar *filename)
 			cur_dir = g_get_current_dir();
 		else
 			cur_dir = g_strdup(original_cwd);
+#ifdef G_OS_WIN32
+		SETPTR(cur_dir, utils_get_locale_from_utf8(cur_dir));
+#endif
 
 		result = g_strjoin(
 			G_DIR_SEPARATOR_S, cur_dir, filename, NULL);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2660#issuecomment-727908600
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20201116/0bcfc9c6/attachment.htm>


More information about the Github-comments mailing list