#include <iconv.h>
|
int
iconv_close (iconv_t cd); |
The iconv_close sets errno to EBADF if the conversion descriptor is a bad descriptor
#include<stdio.h> #include<iconv.h> int main() { iconv_t cd = NULL; //Allocate descriptor for charset conversion cd = iconv_open("UTF-8", "ISO-8859-1"); if(cd == (iconv_t) -1) { printf("Unbale to create a conversion descriptor0); } else { printf("Conversion descriptor is created successfully0); } if(!iconv_close(cd)) { printf("Conversion descriptor is deallocated successfully0); } else { printf("Conversion descriptor deallocation failed0); } return 0; }
Output
Conversion descriptor is created successfully Conversion descriptor is deallocated successfully
EBADF | Bad file descriptor |
© 2005-2007 Nokia |