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
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 {OPEN_MAX}  file  descriptors  are currently open in the calling
47              process.
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
57       The following sections are informative.
58

EXAMPLES

60       None.
61

APPLICATION USAGE

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

RATIONALE

74       None.
75

FUTURE DIRECTIONS

77       None.
78

SEE ALSO

80       iconv(),    iconv_close(),    the    Base    Definitions    volume   of
81       IEEE Std 1003.1-2001, <fcntl.h>, <iconv.h>
82
84       Portions of this text are reprinted and reproduced in  electronic  form
85       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
86       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
87       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
88       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
89       event of any discrepancy between this version and the original IEEE and
90       The Open Group Standard, the original IEEE and The Open Group  Standard
91       is  the  referee document. The original Standard can be obtained online
92       at http://www.opengroup.org/unix/online.html .
93
94
95
96IEEE/The Open Group                  2003                       ICONV_OPEN(3P)
Impressum