Function
Gimpany_to_utf8
Declaration [src]
gchar*
gimp_any_to_utf8 (
  const gchar* str,
  gssize len,
  const gchar* warning_format,
  ...
)
Description [src]
This function takes any string (UTF-8 or not) and always returns a valid UTF-8 string.
If str is valid UTF-8, a copy of the string is returned.
If UTF-8 validation fails, g_locale_to_utf8() is tried and if it
succeeds the resulting string is returned.
Otherwise, the portion of str that is UTF-8, concatenated
with “(invalid UTF-8 string)” is returned. If not even the start of str is valid UTF-8, only “(invalid UTF-8 string)” is returned.
This function is not directly available to language bindings.
Parameters
- str
- 
            Type: An array of gcharThe string to be converted to UTF-8. The length of the array is specified in the lenargument.The data is owned by the caller of the function. Each element is a NUL terminated UTF-8 string. 
- len
- 
            Type: gssizeThe length of the string, or -1 if the string is nul-terminated. 
- warning_format
- 
            Type: const gchar*The message format for the warning message if conversion to UTF-8 fails. See the printf() documentation.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. 
- ...
- 
            Type: The parameters to insert into the format string.