Gimp.filename_to_utf8

function filename_to_utf8(filename: String): String {
    // Gjs wrapper for gimp_filename_to_utf8()
}
  

Convert a filename in the filesystem's encoding to UTF-8 temporarily. The return value is a pointer to a string that is guaranteed to be valid only during the current iteration of the main loop or until the next call to Gimp.filename_to_utf8.

The only purpose of this function is to provide an easy way to pass a filename in the filesystem encoding to a function that expects an UTF-8 encoded filename.

filename

The filename to be converted to UTF-8.

Returns

A temporarily valid UTF-8 representation of filename. This string must not be changed or freed.