iconv_open(3C)

iconv_open - code conversion allocation function

As shipped in IRIX 6.5.5. Unchanged since IRIX 6.5.

NAME
     iconv_open - code conversion allocation function


SYNOPSIS
     #include <iconv.h>

     iconv_t iconv_open(const char *tocode, const char *fromcode);


DESCRIPTION
     The iconv_open() function returns a conversion descriptor that points to
     the suitable codeset converter. It describes a conversion from the
     codeset specified by the string pointed to by the fromcode argument to
     the codeset specified by the string pointed to by the tocode argument.  A
     conversion descriptor can be used in a process until that process closes
     it.  If a file descriptor is used to implement conversion descriptors,
     the FD_CLOEXEC flag will be set; see <fcntl.h>.

     The iconv_open()  function may fail under the following conditions and
     set errno to the suitable value.


     [EMFILE]

          {OPEN_MAX} files descriptors are currently open in the calling
          process.


     [ENFILE]

          There are too many files which is currently open in the system.


     [ENOMEM]

          Sufficient storage space is not available.


     [EINVAL]

          The conversion specified by fromcode and tocode is not supported by
          the implementation.

     The iconv_open() function returns a conversion descriptor for use on
     subsequent calls to iconv(), upon successful completion. Otherwise
     iconv_open() returns (iconv_t)-1 and sets errno to indicate the error.

SEE ALSO
     iconv() , iconv_close().