### Function

# FwupdPlugin utf16_to_utf8_bytes

#### Declaration [src]

    gchar*
    fu_utf16_to_utf8_bytes (
      GBytes* bytes,
      FuEndianType endian,
      GError** error
    )

#### Description [src]

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

Available since: | 1.9.3

#### Parameters

`bytes` | `GBytes`
| A `GBytes`.
| 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.