static unsigned char   stdibuf[IOBUF_SIZE];
char *ptexenc_nkf(FILE *fp) {
    nkf_state_init();
    guess_f = TRUE;
    o_putc = no_putc;
    if (guess_f) {
#ifdef CHECK_OPTION
        int debug_f_back = debug_f;
#endif
#ifdef EXEC_IO
        int exec_f_back = exec_f;
#endif
#ifdef X0212_ENABLE
        int x0212_f_back = x0212_f;
#endif
        int x0213_f_back = x0213_f;
        int guess_f_back = guess_f;
        reinit();
        guess_f = guess_f_back;
        mime_f = FALSE;
#ifdef CHECK_OPTION
        debug_f = debug_f_back;
#endif
#ifdef EXEC_IO
        exec_f = exec_f_back;
#endif
        x0212_f = x0212_f_back;
        x0213_f = x0213_f_back;
    }
    //setvbuffer(fp, (char *) stdibuf, IOBUF_SIZE);
    kanji_convert(fp);
    rewind(fp);
    return (char *)get_guessed_code();
}
