iconv_open(3C) iconv_open(3C)
NAME
iconv_open - code conversion allocation function.
SYNOPSIS
#include <iconv.h>
iconv_t iconv_open(const char *tocode, const char *fromcode);
DESCRIPTION
iconv_open returns a conversion descriptor for the codeset
conversion from codeset fromcode to codeset tocode. This
descriptor is used on subsequent calls to iconv.
The allowable values for fromcode and tocode are dependent on
the implementation. This is also true for the different
combinations allowed.
A conversion descriptor is valid until the creating process
terminates, or until it is passed to iconv_close.
Return Values
If iconv_open completes successfully, a conversion descriptor
is returned. Should the function fail,iconv_open returns
(iconv_t)-1 and errno is set to indicate an error.
Errors
EMFILE There may be no more file descriptors free for the
process.
ENFILE There may be too many open files on the system.
ENOMEM Not enough memory.
EINVAL The implementation does not support the specified
conversion.
REFERENCES
iconv(1), iconv(3C), iconv_close(3C), iconvh(5)
NOTICES
In some implementations, this function uses dynamic memory
allocation (malloc) to provide space for internal buffer
areas. If there is not enough space to cater for these
buffers, it is likely that the iconv_open function will fail.
Copyright 1994 Novell, Inc. Page 1
iconv_open(3C) iconv_open(3C)
Applications that are portable must assume that conversion
descriptors are invalidated after one of the exec functions is
called.
Copyright 1994 Novell, Inc. Page 2