Function

FwupdPluginutf16_to_utf8_byte_array

Declaration [src]

gchar*
fu_utf16_to_utf8_byte_array (
  GByteArray* array,
  FuEndianType endian,
  GError** error
)

Description [src]

Converts a UTF-16 buffer to a UTF-8 string.

Available since:1.9.3

Parameters

array An array of guint8
 

A GByteArray.

 The data is owned by the caller of the function.
endian FuEndianType
 

An endian type, e.g. G_LITTLE_ENDIAN.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gchar*
 

A string, or NULL on error.

 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.