Returns the display basename for the particular filename, guaranteed to be valid UTF-8. The display name might not be identical to the filename, for instance there might be problems converting it to UTF-8, and some files can be translated in the display.
If GLib cannot make sense of the encoding of
filename, as a last resort it
replaces unknown characters with U+FFFD, the Unicode replacement character.
You can search the result for the UTF-8 encoding of this character (which is
“\357\277\275” in octal notation) to find out if
filename was in an invalid encoding.
You must pass the whole absolute pathname to this functions so that translation of well known locations can be done.
This function is preferred over
g_filename_display_name() if you know the
whole path, as it allows translation.
An absolute pathname in the GLib file name encoding.
|The data is owned by the caller of the function.|
|The string is a file system path, using the OS encoding.|