Either use local encoding on windows for g_filename or add g_filename_to_locale()
The encodings for g_filenames are inconsistent across operating systems:
- POSIX:
envvar: "G_FILENAME_ENCODING":"G_BROKEN_FILENAMES"
, fallback: local filesystem encoding - Windows: UTF8 only
Desired 1: - POSIX and Windows: local filesystem encoding
Desired 2: - POSIX and Windows: UTF8
Desired 3: - POSIX and Windows: local OS encoding
Also functions like g_filename_to_locale()
, g_filename_from_locale()
, g_filename_to_native()
, g_filename_from_native()
should be implemented.
g_filename_to_native()
, g_filename_from_native()
will work with wchar for windows and char for POSIX.
This will improve the usability with the c++17 std::filesystem library.
Edited by Fabian Keßler