Function

Purpleutf8_try_convert

since: 2.0

Declaration [src]

gchar*
purple_utf8_try_convert (
  const char* str
)

Description [src]

Attempts to convert a string to UTF-8 from an unknown encoding.

This function checks the locale and tries sane defaults.

Available since: 2.0

Parameters

str

Type: const char*

The source string.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: gchar*

The UTF-8 string, or NULL if it could not be converted.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.