OSDN Git Service

* fix: after UTF-8 string in Q-encoding, can't decode MIME Encode
[nkf/nkf.git] / nkf.c
diff --git a/nkf.c b/nkf.c
index e620549..650bdea 100644 (file)
--- a/nkf.c
+++ b/nkf.c
@@ -39,7 +39,7 @@
 **        E-Mail: furukawa@tcp-ip.or.jp
 **    \e$B$^$G8fO"Mm$r$*4j$$$7$^$9!#\e(B
 ***********************************************************************/
-/* $Id: nkf.c,v 1.55 2005/01/24 08:19:34 naruse Exp $ */
+/* $Id: nkf.c,v 1.56 2005/02/02 17:52:31 naruse Exp $ */
 #define NKF_VERSION "2.0.4"
 #define NKF_RELEASE_DATE "2005-01-01"
 #include "config.h"
@@ -1885,7 +1885,7 @@ kanji_convert(f)
             /* second byte */
             if (c2 > DEL) {
                 /* in case of 8th bit is on */
-                if (!estab_f) {
+                if (!estab_f&&!mime_decode_mode) {
                     /* in case of not established yet */
                     /* It is still ambiguious */
                     if (h_conv(f, c2, c1)==EOF) 
@@ -3547,6 +3547,7 @@ FILE *f;
     }
     mime_decode_mode = p[i-2];
 
+    set_iconv(FALSE, mime_priority_func[j]);
     clr_code_score(find_inputcode_byfunc(mime_priority_func[j]), SCORE_iMIME);
 
     if (mime_decode_mode=='B') {