From: NARUSE, Yui Date: Sun, 28 Jan 2007 15:30:05 +0000 (+0000) Subject: * Fix: Can't decode MIME encode JIS strings. X-Git-Tag: v2_0_8~6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;ds=sidebyside;h=c1a05966de37b67ad79a610e6524634810860904;p=nkf%2Fnkf.git * Fix: Can't decode MIME encode JIS strings. http://pc10.2ch.net/test/read.cgi/unix/1005206241/189 --- diff --git a/nkf.c b/nkf.c index b9f4755..d83ec9f 100644 --- a/nkf.c +++ b/nkf.c @@ -39,9 +39,9 @@ ** E-Mail: furukawa@tcp-ip.or.jp ** まで御連絡をお願いします。 ***********************************************************************/ -/* $Id: nkf.c,v 1.119 2006/11/11 20:33:56 naruse Exp $ */ +/* $Id: nkf.c,v 1.120 2007/01/28 06:30:05 naruse Exp $ */ #define NKF_VERSION "2.0.8" -#define NKF_RELEASE_DATE "2006-11-12" +#define NKF_RELEASE_DATE "2007-01-28" #include "config.h" #include "utf8tbl.h" @@ -2733,13 +2733,13 @@ nkf_char kanji_convert(FILE *f) /* normal ASCII code */ SEND; } - } else if (!is_8bit && c1 == SI) { + } else if (c1 == SI && (!is_8bit || mime_decode_mode)) { shift_mode = FALSE; NEXT; - } else if (!is_8bit && c1 == SO) { + } else if (c1 == SO && (!is_8bit || mime_decode_mode)) { shift_mode = TRUE; NEXT; - } else if (!is_8bit && c1 == ESC ) { + } else if (c1 == ESC && (!is_8bit || mime_decode_mode)) { if ((c1 = (*i_getc)(f)) == EOF) { /* (*oconv)(0, ESC); don't send bogus code */ LAST;