Function
Talkatucodeset_coerce_utf8
Declaration [src]
gchar*
talkatu_codeset_coerce_utf8 (
const guint8* data,
gsize length,
gsize* text_length,
GError** error
)
Description [src]
Attempts to coerce the raw data into UTF-8.
Currently it handles UTF-8, UTF-16 (host encoding), UTF-16 littled endian, and UTF-16 big endian.
Parameters
data-
Type:
const guint8*The raw data to coerce.
The data is owned by the caller of the function. length-
Type:
gsizeThe length of the raw data in bytes.
text_length-
Type:
gsize*A return address for the length of the coerced text.
The data is owned by the caller of the function. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will left initialized to NULLby the function if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.