He is some example code of how I can do it with the iconv command:-
#include <stdio.h> /* printf */
#include <stdlib.h> /* system, NULL, EXIT_FAILURE */
int main ()
{
int i;
setvbuf(stdout, (char*)NULL, _IONBF, 0);
printf ("MyFile\n");
setvbuf(stdout, (char*)NULL, _IONBF, 0)...