From 06b4555a0ec1faa55dea504da77551876e8ce285 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 29 Dec 2018 00:50:51 +0000 Subject: snapshot of project "lynx", label v2-9-0dev_0g --- src/UCdomap.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/UCdomap.c b/src/UCdomap.c index 7c2ef7c5..ddac1876 100644 --- a/src/UCdomap.c +++ b/src/UCdomap.c @@ -1,5 +1,5 @@ /* - * $LynxId: UCdomap.c,v 1.103 2017/02/08 01:23:33 tom Exp $ + * $LynxId: UCdomap.c,v 1.104 2018/12/29 00:20:33 Kihara.Hideto Exp $ * * UCdomap.c * ========= @@ -1217,6 +1217,16 @@ UCode_t UCTransToUni(int ch_in, buffer[0] = (char) ch_in; inx = 1; return ucNeedMore; + } else if (IS_SJIS_X0201KANA(ch_iu)) { + buffer[0] = (char) ch_in; + buffer[1] = 0; + cd = iconv_open("UTF-16BE", "Shift_JIS"); + ilen = 1; + (void) iconv(cd, (ICONV_CONST char **) &pin, &ilen, &pout, &olen); + iconv_close(cd); + if ((ilen == 0) && (olen == 0)) { + return (UCH(obuffer[0]) << 8) + UCH(obuffer[1]); + } } } else { if (IS_SJIS_LO(ch_iu)) { @@ -1235,7 +1245,7 @@ UCode_t UCTransToUni(int ch_in, } if (strcmp(LYCharSet_UC[charset_in].MIMEname, "euc-jp") == 0) { if (inx == 0) { - if (IS_EUC_HI(ch_iu)) { + if (IS_EUC_HI(ch_iu) || ch_iu == 0x8E) { buffer[0] = (char) ch_in; inx = 1; return ucNeedMore; -- cgit 1.4.1-2-gfad0