1ICONV_OPEN(3P)             POSIX Programmer's Manual            ICONV_OPEN(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       iconv_open — codeset conversion allocation function
13

SYNOPSIS

15       #include <iconv.h>
16
17       iconv_t iconv_open(const char *tocode, const char *fromcode);
18

DESCRIPTION

20       The iconv_open() function shall return  a  conversion  descriptor  that
21       describes a conversion from the codeset specified by the string pointed
22       to by the fromcode argument to the  codeset  specified  by  the  string
23       pointed  to  by the tocode argument. For state-dependent encodings, the
24       conversion descriptor shall be in  a  codeset-dependent  initial  shift
25       state, ready for immediate use with iconv().
26
27       Settings  of  fromcode  and tocode and their permitted combinations are
28       implementation-defined.
29
30       A conversion descriptor shall  remain  valid  until  it  is  closed  by
31       iconv_close() or an implicit close.
32
33       If  a  file descriptor is used to implement conversion descriptors, the
34       FD_CLOEXEC flag shall be set; see <fcntl.h>.
35

RETURN VALUE

37       Upon successful completion,  iconv_open()  shall  return  a  conversion
38       descriptor   for  use  on  subsequent  calls  to  iconv().   Otherwise,
39       iconv_open() shall return (iconv_t)-1 and set  errno  to  indicate  the
40       error.
41

ERRORS

43       The iconv_open() function may fail if:
44
45       EMFILE All  file  descriptors  available  to  the process are currently
46              open.
47
48       ENFILE Too many files are currently open in the system.
49
50       ENOMEM Insufficient storage space is available.
51
52       EINVAL The conversion specified by fromcode and tocode is not supported
53              by the implementation.
54
55       The following sections are informative.
56

EXAMPLES

58       None.
59

APPLICATION USAGE

61       Some implementations of iconv_open() use malloc() to allocate space for
62       internal buffer areas. The iconv_open() function may fail if  there  is
63       insufficient storage space to accommodate these buffers.
64
65       Conforming applications must assume that conversion descriptors are not
66       valid after a call to one of the exec functions.
67
68       Application developers  should  consult  the  system  documentation  to
69       determine the supported codesets and their naming schemes.
70

RATIONALE

72       None.
73

FUTURE DIRECTIONS

75       None.
76

SEE ALSO

78       iconv(), iconv_close()
79
80       The Base Definitions volume of POSIX.1‐2017, <fcntl.h>, <iconv.h>
81
83       Portions  of  this text are reprinted and reproduced in electronic form
84       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
85       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
86       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
87       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
88       event of any discrepancy between this version and the original IEEE and
89       The  Open Group Standard, the original IEEE and The Open Group Standard
90       is the referee document. The original Standard can be  obtained  online
91       at http://www.opengroup.org/unix/online.html .
92
93       Any  typographical  or  formatting  errors that appear in this page are
94       most likely to have been introduced during the conversion of the source
95       files  to  man page format. To report such errors, see https://www.ker
96       nel.org/doc/man-pages/reporting_bugs.html .
97
98
99
100IEEE/The Open Group                  2017                       ICONV_OPEN(3P)
Impressum