### Method

# GLib IOChannel get_encoding

#### Declaration

    const gchar*
    g_io_channel_get_encoding (
      GIOChannel* channel
    )

#### Description

Gets the encoding for the input/output of the channel. The internal encoding is always UTF-8. The encoding `NULL` makes the channel safe for binary data.

#### Return value

Type: `const gchar*`

A string containing the encoding, this string is owned by GLib and must not be freed.

The data is owned by the instance.
The value is a NUL terminated UTF-8 string.