Several years ago, I wrote a program in C++ to process text files. I now need it to work with unicode encoding. I'm not a professional programmer, so I would enjoy precise indications. Here is the relevant part of the code:
register char c, d, e, f, *p, *q1=NULL, *q2=NULL; char bufferhead[10000], tmp[100]; register char *buffer, *tmpbuffer; c=fgetc(infile); if(c==EOF){...} if(c=='\n'){...} fputc(c, outfile); if(c==*q) return(1); while(c!=' ' && c!=EOF && c!='\n' && j<90){ tmp[j]=c; j++; c=fgetc(infile); } tmp[j]=0; fputs(tmp, outfile); *buffer=c; buffer++; switch(*buffer){ case '}': fputc('{', outfile); etc.