libiconv_iconv_open_into3
Initialize descriptor for character set conversion
Usage
#include <iconv.h>
int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);
Overview
The iconv_open_into function initializes a conversion descriptor suitable for converting byte sequences from character encoding fromcode to character encoding tocode. The conversion descriptor is stored in the memory pointed to by resultp.
The values permitted for fromcode and tocode are the same as for the function iconv_open.
After a successful return from this function, resultp can be be used as an iconv_t object with the iconv function.
Return value
The iconv_open_into function fills *resultp and returns 0 if it succeeds. In case of error, it sets errno and returns -1.
Errors
The following error can occur, among others:
- EINVAL
-
The conversion from fromcode to tocode is not supported by the implementation.