OSDN Git Service

Output \e in SJIS and UTF-8. [ruby-dev:39120]
authorNARUSE Yui <naruse@users.sourceforge.jp>
Thu, 20 Aug 2009 23:46:26 +0000 (08:46 +0900)
committerNARUSE Yui <naruse@users.sourceforge.jp>
Thu, 20 Aug 2009 23:46:26 +0000 (08:46 +0900)
nkf.c

diff --git a/nkf.c b/nkf.c
index 162a173..4230199 100644 (file)
--- a/nkf.c
+++ b/nkf.c
@@ -5530,7 +5530,7 @@ kanji_convert(FILE *f)
                SKIP;
            } else if (c1 == ESC && (!is_8bit || mime_decode_mode)) {
                if ((c1 = (*i_getc)(f)) == EOF) {
                SKIP;
            } else if (c1 == ESC && (!is_8bit || mime_decode_mode)) {
                if ((c1 = (*i_getc)(f)) == EOF) {
-                   /*  (*oconv)(0, ESC); don't send bogus code */
+                   (*oconv)(0, ESC);
                    LAST;
                }
                else if (c1 == '&') {
                    LAST;
                }
                else if (c1 == '&') {
@@ -5660,7 +5660,7 @@ kanji_convert(FILE *f)
            } else if (c1 == ESC && iconv == s_iconv) {
                /* ESC in Shift_JIS */
                if ((c1 = (*i_getc)(f)) == EOF) {
            } else if (c1 == ESC && iconv == s_iconv) {
                /* ESC in Shift_JIS */
                if ((c1 = (*i_getc)(f)) == EOF) {
-                   /*  (*oconv)(0, ESC); don't send bogus code */
+                   (*oconv)(0, ESC);
                    LAST;
                } else if (c1 == '$') {
                    /* J-PHONE emoji */
                    LAST;
                } else if (c1 == '$') {
                    /* J-PHONE emoji */