[LEFT]performing this code to read from file and print each character in separate line
works well with ASCII encoded text[/LEFT]
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int argc, char *argv [])
{
preprocess_file (stdin);
exit (0);
}
but when i use it with UTF-8 encoded text it shows unreadable character such as
�
�
�
�
�
�
�
any help? Thanks