OSDN Git Service

* set_input_codename from iconv when input_codename isn't set
authorNARUSE, Yui <naruse@users.sourceforge.jp>
Fri, 4 Mar 2005 07:03:17 +0000 (07:03 +0000)
committerNARUSE, Yui <naruse@users.sourceforge.jp>
Fri, 4 Mar 2005 07:03:17 +0000 (07:03 +0000)
nkf.c

diff --git a/nkf.c b/nkf.c
index 09f0eb6..852a3ab 100644 (file)
--- a/nkf.c
+++ b/nkf.c
@@ -39,9 +39,9 @@
 **        E-Mail: furukawa@tcp-ip.or.jp
 **    \e$B$^$G8fO"Mm$r$*4j$$$7$^$9!#\e(B
 ***********************************************************************/
-/* $Id: nkf.c,v 1.62 2005/02/27 01:22:02 rei_furukawa Exp $ */
+/* $Id: nkf.c,v 1.63 2005/03/03 22:03:17 naruse Exp $ */
 #define NKF_VERSION "2.0.4"
-#define NKF_RELEASE_DATE "2005-02-20"
+#define NKF_RELEASE_DATE "2005-03-04"
 #include "config.h"
 
 static char *CopyRight =
@@ -2197,6 +2197,13 @@ kanji_convert(f)
 
     /* epilogue */
     (*iconv)(EOF, 0, 0);
+    if (!is_inputcode_set)
+       set_input_codename(
+           iconv == e_iconv ? "EUC-JP" :
+           iconv == s_iconv ? "Shift_JIS" :
+           iconv == w_iconv ? "UTF-8" :
+           iconv == w_iconv16 ? "UTF-16" :
+           "ASCII");
     return 1;
 }