以前用过的成然CCDOS97好象就实际了自动简繁....这儿有一篇
http://www.ibiblio.org/ccic/ftp-pub/software/data/chrecog.gb.html

解决方案 »

  1.   

    可以参考
    http://www.ibiblio.org/ccic/ftp-pub/software/data/chrecog.gb.html/*******************************************************    Please feel free to use, modify
        or redistribute this program.********************************************************/
    #define  SEP_VALUE 184.
    #include <stdio.h>
    main(int argc, char **argv)
    {
    FILE *fp; if(argc == 1)
    fp = stdin;
    else {
    fp = fopen(argv[1], "r");
    if(!fp) {
    printf("Cannot open file!\n");
    exit(0);
    }
    }
    countfile(fp);
    fclose(fp);
    }countfile(FILE *fp)
    {
            int ch1, ch2;
            unsigned long int num=0, value=0;
            float final; while((ch1 = fgetc(fp))!=EOF){ if(ch1 & 0x80){
    /* value  += ch1; num ++; 
    */ ch2 = fgetc(fp);
    value  += ch2; num ++;
    }
    } if(num == 0) {
    printf("Pure 7-bit character file.\n");
    exit(0);
    }
    if(num < 80) 
    printf("The result maybe incorrect!\n"); final = (float)value/(float)num;
    printf("Average:%.2f .... %s.\n", 
    final, ((final>SEP_VALUE)? "GB File":"BIG5 File"));