Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iconv_open(3C) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iconv(3C)

iconv_open(3C)                                               iconv_open(3C)

NAME
     iconvopen - code conversion allocation function

SYNOPSIS
     #include <iconv.h>

     iconvt iconvopen(const char *tocode, const char *fromcode);

DESCRIPTION
     The iconvopen() function returns a conversion descriptor that
     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. For state-dependent encod-
     ings, the conversion descriptor will be in a codeset-dependent initial
     shift state, ready for immediate use with the iconv() function.

     Settings of fromcode and tocode and their permitted combinations are
     implementation-dependent.

     A conversion descriptor remains valid in a process until that process
     closes it.

     If a file descriptor is used to implement conversion descriptors, the
     FDCLOEXEC flag will be set.

     iconvopen() uses malloc() to allocate space for internal buffer
     areas. iconvopen() function will fail if there is insufficient
     storage space to accommodate these buffers.

     Portable applications must assume that conversion descriptors are not
     valid after a call to one of the exec() functions.

     The iconvopen() function will fail if:

     EMFILE
          OPENMAX file descriptors are currently open in the calling pro-
          cess.

     ENFILE
          Too many files are currently open in the system.

     ENOMEM
          Insufficient storage space is available.

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

RESULT
     Upon successful completion iconvopen() returns a conversion descrip-
     tor for use on subsequent calls to iconv(). Otherwise iconvopen()
     returns (iconvt)-1 and sets errno to indicate the error.



Page 1                       Reliant UNIX 5.44                Printed 11/98

iconv_open(3C)                                               iconv_open(3C)

SEE ALSO
     iconv(3C), iconvclose(3C).




















































Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026