### Function

# GLib IConv open

#### Declaration [src]

    GIConv
    g_iconv_open (
      const gchar* to_codeset,
      const gchar* from_codeset
    )

#### Description [src]

Same as the standard UNIX routine iconv_open(), but may be implemented via libiconv on UNIX flavors that lack a native implementation.

GLib provides `g_convert()` and `g_locale_to_utf8()` which are likely more convenient than the raw iconv wrappers.

This function is not directly available to language bindings.

#### Parameters

`to_codeset`

  Type: `const gchar*`

  Destination codeset.

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

`from_codeset`

  Type: `const gchar*`

  Source codeset.

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

#### Return value

Type: `GIConv`

A “conversion descriptor”, or (GIConv)-1 if opening the converter failed.