Hi!
I'm trying to convert ebcdic to ascii with the code below. But not converting.
Someone knows how to convert?
Thanks.

Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. FILE* in;
  4. FILE* out;
  5.  
  6. char dummy[3201];
  7. char input[200];
  8. char output[200];
  9. strcpy(input, argv[1]);
  10. strcpy(output,argv[2]);
  11.  
  12. if ((in = fopen(input,"r")) == NULL) {
  13. printf("\nERROR: cannot find input file %s\n\n",input);
  14. exit(1);
  15. }
  16.  
  17. if ((out = fopen(output,"w")) == NULL) {
  18. printf("\nERROR: cannot open output file %s\n\n",output);
  19. exit(1);
  20. }
  21.  
  22. fread (&dummy, 3200, 1, in);
  23.  
  24. QString texto = QString::fromAscii(dummy);
  25. qDebug() << text;
  26. fprintf(out, "%s\n", dummy);
  27.  
  28. return 0;
  29. }
To copy to clipboard, switch view to plain text mode