Non-ASCII characters cannot be used on command line in Windows
As noticed here , filenames with non-ASCII characters cannot be opened via the command line in Windows. Opening the same files from the Open dialog works correctly.
This is due to GLib's crazy definition of "filename encoding", which means the system locale on every system except Windows, but UTF-8 on Windows . When we pass G_OPTION_ARG_FILENAME_ARRAY to GLib to get our list of filenames from the command line, we are treating these filenames as though they are in the system locale. This is a correct assumption on most systems, but on Windows, GLib has already converted those filenames to UTF-8. We happily go and run the conversion a second time, which (for example) turns "ú" (FAh in CP1252, C3h BAh in UTF-8) into "Ãº" (C3h 83h C2h BAh in UTF-8).
 Particularly ironic since UTF-8 is one of the few encodings you cannot use for filenames in Windows. You can use CP1252 and most other legacy encodings, or you can use UTF-16, but not UTF-8.
#1 Updated by John Lindgren about 6 years ago
- Status changed from New to Closed
- Target version changed from 52 to 3.5
- % Done changed from 0 to 100