iconv_close -- Remove Conversion Descriptor

Format

#include <iconv.h>
int iconv_close(iconv_t cd);

Language Level: XPG4
iconv_close deallocates the conversion descriptor cd and all other associated resources allocated by the iconv_open function.

Returned Value
If successful, iconv_close returns 0. Otherwise, iconv_close returns -1 is returned and sets errno to indicate the cause of the error. If cd is not a valid descriptor, an error occurs and iconv_close sets errno to EBADF.

Example



Locales and Localization


iconv -- Convert Characters to New Code Set
iconv_open -- Create Conversion Descriptor
setlocale -- Set Locale
<locale.h>