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
11

NAME

13       iconv_open — codeset conversion allocation function
14

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

59       None.
60

APPLICATION USAGE

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

RATIONALE

73       None.
74

FUTURE DIRECTIONS

76       None.
77

SEE ALSO

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