ICONV\_OPEN\_INTO(3) Library Functions Manual ICONV\_OPEN\_INTO(3)

# [NAME](#NAME)

iconv\_open\_into - initialize descriptor for character set conversion

# [SYNOPSIS](#SYNOPSIS)

```
#include <iconv.h>

int iconv_open_into (const char* tocode, const char* fromcode,
                     iconv_allocation_t* resultp);
```

# [DESCRIPTION](#DESCRIPTION)

The **iconv\_open\_into** function initializes a conversion descriptor suitable for converting byte sequences from character encoding *fromcode* to character encoding *tocode*. The conversion descriptor is stored in the memory pointed to by *resultp*.

The values permitted for *fromcode* and *tocode* are the same as for the function **iconv\_open**.

After a successful return from this function, *resultp* can be be used as an **iconv\_t** object with the **iconv** function.

# [RETURN VALUE](#RETURN_VALUE)

The **iconv\_open\_into** function fills **\*resultp** and returns 0 if it succeeds. In case of error, it sets **errno** and returns -1.

# [ERRORS](#ERRORS)

The following error can occur, among others:

[**EINVAL**](#EINVAL)

The conversion from *fromcode* to *tocode* is not supported by the implementation.

# [CONFORMING TO](#CONFORMING_TO)

This function is implemented only in GNU libiconv and not in other **iconv** implementations. It is not backed by a standard. You can test for its presence through **(\_LIBICONV\_VERSION &gt;= 0x010D)**.

# [SEE ALSO](#SEE_ALSO)

[**iconv\_open**(3)](/man/os/gnu-libiconv/iconv_open.3) [**iconv**(3)](/man/os/gnu-libiconv/iconv.3)

September 21, 2008 GNU

---

Document: iconv_open_into(3) from gnu-libiconv 1.19-r8 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/libiconv.git
