open

fun open(toCodeset: String, fromCodeset: String): IConv

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.

Return

a "conversion descriptor", or (GIConv)-1 if opening the converter failed.

Parameters

toCodeset

destination codeset

fromCodeset

source codeset