From f9e43dc01d0595cf74010cf932d1c79cb443a453 Mon Sep 17 00:00:00 2001 From: Rei FURUKAWA Date: Wed, 27 Aug 2003 01:31:50 +0000 Subject: [PATCH] =?utf8?q?UTF-16=20=E5=85=A5=E5=8A=9B=E3=81=AE=E5=A4=89?= =?utf8?q?=E6=8F=9B=E3=81=AE=E4=B8=80=E9=83=A8=E3=83=90=E3=82=B0=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- nkf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nkf.c b/nkf.c index b05670b..57534e2 100644 --- a/nkf.c +++ b/nkf.c @@ -2122,11 +2122,12 @@ w16e_conv(val, p2, p1) if (c0){ pp = utf8_to_euc_3bytes[c2 - 0x80]; psize = sizeof_utf8_to_euc_C2; + return w_iconv_common(c1, c0, pp, psize, p2, p1); }else{ pp = utf8_to_euc_2bytes; psize = sizeof_utf8_to_euc_2bytes; + return w_iconv_common(c2, c1, pp, psize, p2, p1); } - return w_iconv_common(c1, c0, pp, psize, p2, p1); } return val; } @@ -2148,7 +2149,7 @@ w_iconv16(c2, c1, c0) int tmp; tmp=c1; c1=c2; c2=tmp; } - if (c2==0 || c2==EOF) { + if ((c2==0 && c1 < 0x80) || c2==EOF) { (*oconv)(c2, c1); return 0; } -- 2.11.0