pub fn locale_filename_from_utf8(utf8filename: &str) -> GStringExpand description
Converts a filename from UTF-8 to the system codepage.
On NT-based Windows, on NTFS file systems, file names are in Unicode. It is quite possible that Unicode file names contain characters not representable in the system codepage. (For instance, Greek or Cyrillic characters on Western European or US Windows installations, or various less common CJK characters on CJK Windows installations.)
In such a case, and if the filename refers to an existing file, and
the file system stores alternate short (8.3) names for directory
entries, the short form of the filename is returned. Note that the
“short” name might in fact be longer than the Unicode name if the
Unicode name has very short pathname components containing
non-ASCII characters. If no system codepage name for the file is
possible, None is returned.
The return value is dynamically allocated and should be freed with g_free() when no longer needed.
§utf8filename
a UTF-8 encoded filename.
§Returns
The converted filename, or None on conversion
failure and lack of short names.