since: 2.6

Declaration [src]

purple_utf8_strip_unprintables (
  const gchar* str

Description [src]

Removes unprintable characters from a UTF-8 string. These characters (in particular low-ASCII characters) are invalid in XML 1.0 and thus are not allowed in XMPP and are rejected by libxml2 by default.

The returned string must be freed by the caller.

Available since: 2.6



Type: const gchar*

A valid UTF-8 string.

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

Return value

Type: gchar*

A newly allocated UTF-8 string without the unprintable characters.

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.