2011/4/10 Tim Evans <t.ev...@aranz.com>: > A combination of GetCommandLineW and CommandLineToArgvW can get you the > arguments as wchar_t strings which could then be converted to utf8. Is this > just something that glib needs to provide a convenience function for? > g_win32_get_utf8_argv() maybe?
This is not about a convenience function. The real problem is that GOption cannot parse UTF-8 argument lists. It will always consider the argv to be in locale encoding, and the locale encoding cannot accurately represent filenames on Windows. The input encoding for GOption should be switchable at runtime. Once GOption can parse UTF-8, the convenience function to get the Unicode argv on Windows can be written. However, GetCommandLineW / CommandLineToArgvW do not work, because globs are not expanded. You need to use the function __wgetmainargs with glob expansion set to true, the way it is used in glib/gspawn-win32-helper.c. http://msdn.microsoft.com/en-us/library/ff770599.aspx Regards, Krzysztof _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list