### Function

# Gimp filename_to_utf8

#### Declaration [src]

    const gchar*
    gimp_filename_to_utf8 (
      const gchar* filename
    )

#### Description [src]

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.

#### Parameters

`filename` | `const gchar*`
| The filename to be converted to UTF-8.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `const gchar*`
| A temporarily valid UTF-8 representation of `filename`. This string must not be changed or freed.
| The data is owned by the called function.
| The value is a NUL terminated UTF-8 string.