Read TXT with Extended AscII

0

I made the following code to read a TXT file that contains extended char ascii table.

int main(void){
printf("%c %c %c %c %c %c %c %c %c \n",205,187,186,187,200,201,205,188);
FILE *ffpOrig=fopen("a.txt", "r");
for(;!feof(ffpOrig);){
  unsigned char ch;
  fread(&ch, sizeof(unsigned char),1, ffpOrig);
  printf("%c",ch);
}
return 0;
}

a.txt file:

  

╔══════════════════════╗   (I.e.   ╚══════════════════════╝

However, for the following printf, it does not display / read the characters correctly. It shows: ÔòöÔòÉÔòÉÔòÉ .......

PS: The first printf correctly displays the chars: ═ ╗ ║ ╗ ╚ ╔ ═ ╝.

Can anyone help me?

Thank you.

    
asked by anonymous 15.09.2016 / 18:49

0 answers