Index: less/multi.c
diff -u less/multi.c:1.99 less/multi.c:1.100
--- less/multi.c:1.99	Sat Aug  8 12:16:06 1998
+++ less/multi.c	Wed Aug 12 18:53:38 1998
@@ -260,7 +260,7 @@
 		case HEBREW:
 		case CYRILLIC:
 		case LATIN5:
-			assert(mp->multiindex == 1);
+			/* Should I use one byte character, like '?' or '_'? */
 			internalize_wrongmark(mp);
 			return;
 			break;
@@ -270,7 +270,6 @@
 		case JISX0212KANJISUP:
 		case UJIS:
 		case SJIS:
-			assert(mp->multiindex == 2);
 			internalize_wrongmark(mp);
 			return;
 			break;
@@ -398,10 +397,10 @@
 			if (chisvalid_cs(&mp->multiint[mp->intindex],
 					 &mp->multics[mp->intindex])) {
 				mp->multiint[mp->intindex] =
-					mp->multibuf[0] & ~0x80;
+					mp->multiint[0] & ~0x80;
 				mp->multics[mp->intindex] = mp->cs;
 				mp->multiint[mp->intindex + 1] =
-					mp->multibuf[1] & ~0x80;
+					mp->multiint[1] & ~0x80;
 				mp->multics[mp->intindex + 1] =
 					REST_MASK | mp->cs;
 				mp->intindex += 2;
@@ -423,12 +422,30 @@
 			rebuffering_multi(mp);
 		} else
 		{
+			mp->multiint[mp->intindex] = mp->multibuf[0];
+			mp->multics[mp->intindex] = UJIS;
+			mp->multiint[mp->intindex + 1] = mp->multibuf[1];
+			mp->multics[mp->intindex + 1] = REST_MASK | UJIS;
+			mp->multiint[mp->intindex + 2] = mp->multibuf[2];
+			mp->multics[mp->intindex + 2] = REST_MASK | UJIS;
+
+#if 0
+			/*
+			 * less ignore the user defined area
+			 */
 			if (mp->multibuf[0] < 78 + 0xa0) {
+			}
+#endif
+			/*
+			 * Eliminate some wrong codes
+			 */
+			if (chisvalid_cs(&mp->multiint[mp->intindex],
+					 &mp->multics[mp->intindex])) {
 				mp->multiint[mp->intindex] =
-					mp->multibuf[1] & ~0x80;
+					mp->multiint[1] & ~0x80;
 				mp->multics[mp->intindex] = mp->cs;
 				mp->multiint[mp->intindex + 1] =
-					mp->multibuf[2] & ~0x80;
+					mp->multiint[2] & ~0x80;
 				mp->multics[mp->intindex + 1] =
 					REST_MASK | mp->cs;
 				mp->intindex += 2;
@@ -436,7 +453,7 @@
 			} else
 			{
 				/*
-				 * less ignore the user defined area
+				 * less ignore the undefined codes
 				 */
 				internalize_wrongchar(mp);
 			}
@@ -1375,6 +1392,11 @@
 	static unsigned char p[9];
 	int len;
 
+	if (CSISWRONG(charset))
+	{
+		charset = ASCII;
+	}
+
 	p[0] = '\033';
 	len = 1;
 	if ((output == iso7 || output == iso8) && CS2IRR(charset) > 0)
@@ -1472,8 +1494,12 @@
 	buffer2[1] = '\0';
 
 	if (CSISREST(cs))
+	{
+		return (buffer2);
+	}
+	if (CSISWRONG(cs))
 	{
-	    return (buffer2);
+		cs = ASCII;
 	}
 
 	cs = CS2CHARSET(cs);
Index: less/unify.c
diff -u less/unify.c:1.18 less/unify.c:1.19
--- less/unify.c:1.18	Sat Aug  8 12:16:10 1998
+++ less/unify.c	Wed Aug 12 18:53:39 1998
@@ -972,6 +972,114 @@
 };
 static convtable etable_jisx0208_90 = { eliminate_wrong_jisx0208_90, NULL };
 
+static convtab eliminate_wrong_jisx0212[] = {
+	/* 01-KU 0x2121($(D!!(B)-0x217E($(D!~(B) -> 0x222E($B".(B) */
+	{ "!!", "!~", "\".", JISX0208KANJI },
+	/* 02-KU 0x2221($(D"!(B)-0x222E($(D".(B) -> 0x222E($B".(B) */
+	{ "\"!", "\".", "\".", JISX0208KANJI },
+	/* 02-KU 0x223A($(D":(B)-0x2241($(D"A(B) -> 0x222E($B".(B) */
+	{ "\":", "\"A", "\".", JISX0208KANJI },
+	/* 02-KU 0x2245($(D"E(B)-0x226A($(D"j(B) -> 0x222E($B".(B) */
+	{ "\"E", "\"j", "\".", JISX0208KANJI },
+	/* 02-KU 0x2272($(D"r(B)-0x227E($(D"~(B) -> 0x222E($B".(B) */
+	{ "\"r", "\"~", "\".", JISX0208KANJI },
+	/* 03-KU 0x2321($(D#!(B)-0x237E($(D#~(B) -> 0x222E($B".(B) */
+	{ "#!", "#~", "\".", JISX0208KANJI },
+	/* 04-KU 0x2421($(D$!(B)-0x247E($(D$~(B) -> 0x222E($B".(B) */
+	{ "$!", "$~", "\".", JISX0208KANJI },
+	/* 05-KU 0x2521($(D%!(B)-0x257E($(D%~(B) -> 0x222E($B".(B) */
+	{ "%!", "%~", "\".", JISX0208KANJI },
+	/* 06-KU 0x2621($(D&!(B)-0x2660($(D&`(B) -> 0x222E($B".(B) */
+	{ "&!", "&`", "\".", JISX0208KANJI },
+	/* 06-KU 0x2666($(D&f(B) -> 0x222E($B".(B) */
+	{ "&f", NULL, "\".", JISX0208KANJI },
+	/* 06-KU 0x2668($(D&h(B) -> 0x222E($B".(B) */
+	{ "&h", NULL, "\".", JISX0208KANJI },
+	/* 06-KU 0x266B($(D&k(B) -> 0x222E($B".(B) */
+	{ "&k", NULL, "\".", JISX0208KANJI },
+	/* 06-KU 0x266D($(D&m(B)-0x2670($(D&p(B) -> 0x222E($B".(B) */
+	{ "&m", "&p", "\".", JISX0208KANJI },
+	/* 06-KU 0x267D($(D&}(B)-0x267E($(D&~(B) -> 0x222E($B".(B) */
+	{ "&}", "&~", "\".", JISX0208KANJI },
+	/* 07-KU 0x2721($(D'!(B)-0x2741($(D'A(B) -> 0x222E($B".(B) */
+	{ "'!", "'A", "\".", JISX0208KANJI },
+	/* 07-KU 0x274F($(D'O(B)-0x2771($(D'q(B) -> 0x222E($B".(B) */
+	{ "'O", "'q", "\".", JISX0208KANJI },
+	/* 08-KU 0x2821($(D(!(B)-0x287E($(D(~(B) -> 0x222E($B".(B) */
+	{ "(!", "(~", "\".", JISX0208KANJI },
+	/* 09-KU 0x2923($(D)#(B) -> 0x222E($B".(B) */
+	{ ")#", NULL, "\".", JISX0208KANJI },
+	/* 09-KU 0x2925($(D)%(B) -> 0x222E($B".(B) */
+	{ ")%", NULL, "\".", JISX0208KANJI },
+	/* 09-KU 0x2927($(D)'(B) -> 0x222E($B".(B) */
+	{ ")'", NULL, "\".", JISX0208KANJI },
+	/* 09-KU 0x292A($(D)*(B) -> 0x222E($B".(B) */
+	{ ")*", NULL, "\".", JISX0208KANJI },
+	/* 09-KU 0x292E($(D).(B) -> 0x222E($B".(B) */
+	{ ").", NULL, "\".", JISX0208KANJI },
+	/* 09-KU 0x2931($(D)1(B)-0x2940($(D)@(B) -> 0x222E($B".(B) */
+	{ ")1", ")@", "\".", JISX0208KANJI },
+	/* 09-KU 0x2951($(D)Q(B)-0x297E($(D)~(B) -> 0x222E($B".(B) */
+	{ ")Q", ")~", "\".", JISX0208KANJI },
+	/* 10-KU 0x2A39($(D*9(B) -> 0x222E($B".(B) */
+	{ "*9", NULL, "\".", JISX0208KANJI },
+	/* 10-KU 0x2A78($(D*x(B)-0x2A7E($(D*~(B) -> 0x222E($B".(B) */
+	{ "*x", "*~", "\".", JISX0208KANJI },
+	/* 11-KU 0x2B3C($(D+<(B) -> 0x222E($B".(B) */
+	{ "+<", NULL, "\".", JISX0208KANJI },
+	/* 11-KU 0x2B44($(D+D(B) -> 0x222E($B".(B) */
+	{ "+D", NULL, "\".", JISX0208KANJI },
+	/* 11-KU 0x2B78($(D+x(B)-0x2B7E($(D+~(B) -> 0x222E($B".(B) */
+	{ "+x", "+~", "\".", JISX0208KANJI },
+	/* 12-KU 0x2C21($(D,!(B)-0x2C7E($(D,~(B) -> 0x222E($B".(B) */
+	{ ",!", ",~", "\".", JISX0208KANJI },
+	/* 13-KU 0x2D21($(D-!(B)-0x2D7E($(D-~(B) -> 0x222E($B".(B) */
+	{ "-!", "-~", "\".", JISX0208KANJI },
+	/* 14-KU 0x2E21($(D.!(B)-0x2E7E($(D.~(B) -> 0x222E($B".(B) */
+	{ ".!", ".~", "\".", JISX0208KANJI },
+	/* 15-KU 0x2F21($(D/!(B)-0x2F7E($(D/~(B) -> 0x222E($B".(B) */
+	{ "/!", "/~", "\".", JISX0208KANJI },
+	/* 77-KU 0x6D64($(Dmd(B)-0x6D7E($(Dm~(B) -> 0x222E($B".(B) */
+	{ "md", "m~", "\".", JISX0208KANJI },
+	/* 78-KU 0x6E21($(Dn!(B)-0x6E7E($(Dn~(B) -> 0x222E($B".(B) */
+	{ "n!", "n~", "\".", JISX0208KANJI },
+	/* 79-KU 0x6F21($(Do!(B)-0x6F7E($(Do~(B) -> 0x222E($B".(B) */
+	{ "o!", "o~", "\".", JISX0208KANJI },
+	/* 80-KU 0x7021($(Dp!(B)-0x707E($(Dp~(B) -> 0x222E($B".(B) */
+	{ "p!", "p~", "\".", JISX0208KANJI },
+	/* 81-KU 0x7121($(Dq!(B)-0x717E($(Dq~(B) -> 0x222E($B".(B) */
+	{ "q!", "q~", "\".", JISX0208KANJI },
+	/* 82-KU 0x7221($(Dr!(B)-0x727E($(Dr~(B) -> 0x222E($B".(B) */
+	{ "r!", "r~", "\".", JISX0208KANJI },
+	/* 83-KU 0x7321($(Ds!(B)-0x737E($(Ds~(B) -> 0x222E($B".(B) */
+	{ "s!", "s~", "\".", JISX0208KANJI },
+	/* 84-KU 0x7421($(Dt!(B)-0x747E($(Dt~(B) -> 0x222E($B".(B) */
+	{ "t!", "t~", "\".", JISX0208KANJI },
+	/* 85-KU 0x7521($(Du!(B)-0x757E($(Du~(B) -> 0x222E($B".(B) */
+	{ "u!", "u~", "\".", JISX0208KANJI },
+	/* 86-KU 0x7621($(Dv!(B)-0x767E($(Dv~(B) -> 0x222E($B".(B) */
+	{ "v!", "v~", "\".", JISX0208KANJI },
+	/* 87-KU 0x7721($(Dw!(B)-0x777E($(Dw~(B) -> 0x222E($B".(B) */
+	{ "w!", "w~", "\".", JISX0208KANJI },
+	/* 88-KU 0x7821($(Dx!(B)-0x787E($(Dx~(B) -> 0x222E($B".(B) */
+	{ "x!", "x~", "\".", JISX0208KANJI },
+	/* 89-KU 0x7921($(Dy!(B)-0x797E($(Dy~(B) -> 0x222E($B".(B) */
+	{ "y!", "y~", "\".", JISX0208KANJI },
+	/* 90-KU 0x7A21($(Dz!(B)-0x7A7E($(Dz~(B) -> 0x222E($B".(B) */
+	{ "z!", "z~", "\".", JISX0208KANJI },
+	/* 91-KU 0x7B21($(D{!(B)-0x7B7E($(D{~(B) -> 0x222E($B".(B) */
+	{ "{!", "{~", "\".", JISX0208KANJI },
+	/* 92-KU 0x7C21($(D|!(B)-0x7C7E($(D|~(B) -> 0x222E($B".(B) */
+	{ "|!", "|~", "\".", JISX0208KANJI },
+	/* 93-KU 0x7D21($(D}!(B)-0x7D7E($(D}~(B) -> 0x222E($B".(B) */
+	{ "}!", "}~", "\".", JISX0208KANJI },
+	/* 94-KU 0x7E21($(D~!(B)-0x7E7E($(D~~(B) -> 0x222E($B".(B) */
+	{ "~!", "~~", "\".", JISX0208KANJI },
+	/* NULL */
+	{ 0, 0, 0, 0 }
+};
+static convtable etable_jisx0212 = { eliminate_wrong_jisx0212, NULL };
+
 static convtab eliminate_wrong_sjis[] = {
 	/* SJIS uses JIS X0208 1990 */
 	/* 01-KU no wrong character */
@@ -1183,6 +1291,113 @@
 	{ "\375\241", "\375\376", "\242\256", UJIS },
 	/* 94-KU 0xFEA1($B~!(B)-0xFEFE($B~~(B) -> 0xA2AE($B".(B) */
 	{ "\376\241", "\376\376", "\242\256", UJIS },
+	/*
+	 * And G2 area.
+	 */
+	/* 01-KU 0xA1A1($(D!!(B)-0xA1FE($(D!~(B) -> 0xA2AE($B".(B) */
+	{ "\217\241\241", "\217\241\376", "\242\256", JISX0208KANJI },
+	/* 02-KU 0xA2A1($(D"!(B)-0xA2AE($(D".(B) -> 0xA2AE($B".(B) */
+	{ "\217\242\241", "\217\242\256", "\242\256", JISX0208KANJI },
+	/* 02-KU 0xA2BA($(D":(B)-0xA2C1($(D"A(B) -> 0xA2AE($B".(B) */
+	{ "\217\242\272", "\217\242\301", "\242\256", JISX0208KANJI },
+	/* 02-KU 0xA2C5($(D"E(B)-0xA2EA($(D"j(B) -> 0xA2AE($B".(B) */
+	{ "\217\242\305", "\217\242\352", "\242\256", JISX0208KANJI },
+	/* 02-KU 0xA2F2($(D"r(B)-0xA2FE($(D"~(B) -> 0xA2AE($B".(B) */
+	{ "\217\242\362", "\217\242\376", "\242\256", JISX0208KANJI },
+	/* 03-KU 0xA3A1($(D#!(B)-0xA3FE($(D#~(B) -> 0xA2AE($B".(B) */
+	{ "\217\243\241", "\217\243\376", "\242\256", JISX0208KANJI },
+	/* 04-KU 0xA4A1($(D$!(B)-0xA4FE($(D$~(B) -> 0xA2AE($B".(B) */
+	{ "\217\244\241", "\217\244\376", "\242\256", JISX0208KANJI },
+	/* 05-KU 0xA5A1($(D%!(B)-0xA5FE($(D%~(B) -> 0xA2AE($B".(B) */
+	{ "\217\245\241", "\217\245\376", "\242\256", JISX0208KANJI },
+	/* 06-KU 0xA6A1($(D&!(B)-0xA6E0($(D&`(B) -> 0xA2AE($B".(B) */
+	{ "\217\246\241", "\217\246\340", "\242\256", JISX0208KANJI },
+	/* 06-KU 0xA6E6($(D&f(B) -> 0xA2AE($B".(B) */
+	{ "\217\246\346", NULL, "\242\256", JISX0208KANJI },
+	/* 06-KU 0xA6E8($(D&h(B) -> 0xA2AE($B".(B) */
+	{ "\217\246\350", NULL, "\242\256", JISX0208KANJI },
+	/* 06-KU 0xA6EB($(D&k(B) -> 0xA2AE($B".(B) */
+	{ "\217\246\353", NULL, "\242\256", JISX0208KANJI },
+	/* 06-KU 0xA6ED($(D&m(B)-0xA6F0($(D&p(B) -> 0xA2AE($B".(B) */
+	{ "\217\246\355", "\217\246\360", "\242\256", JISX0208KANJI },
+	/* 06-KU 0xA6FD($(D&}(B)-0xA6FE($(D&~(B) -> 0xA2AE($B".(B) */
+	{ "\217\246\375", "\217\246\376", "\242\256", JISX0208KANJI },
+
+	/* 07-KU 0xA7A1($(D'!(B)-0xA7C1($(D'A(B) -> 0xA2AE($B".(B) */
+	{ "\217\247\241", "\217\247\301", "\242\256", JISX0208KANJI },
+	/* 07-KU 0xA7CF($(D'O(B)-0xA7F1($(D'q(B) -> 0xA2AE($B".(B) */
+	{ "\217\247\317", "\217\247\361", "\242\256", JISX0208KANJI },
+	/* 08-KU 0xA8A1($(D(!(B)-0xA8FE($(D(~(B) -> 0xA2AE($B".(B) */
+	{ "\217\250\241", "\217\250\376", "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9A3($(D)#(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\243", NULL, "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9A5($(D)%(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\245", NULL, "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9A7($(D)'(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\247", NULL, "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9AA($(D)*(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\252", NULL, "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9AE($(D).(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\256", NULL, "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9B1($(D)1(B)-0xA9C0($(D)@(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\261", "\217\251\300", "\242\256", JISX0208KANJI },
+	/* 09-KU 0xA9D1($(D)Q(B)-0xA9FE($(D)~(B) -> 0xA2AE($B".(B) */
+	{ "\217\251\321", "\217\251\376", "\242\256", JISX0208KANJI },
+	/* 10-KU 0xAAB9($(D*9(B) -> 0xA2AE($B".(B) */
+	{ "\217\252\271", NULL, "\242\256", JISX0208KANJI },
+	/* 10-KU 0xAAF8($(D*x(B)-0xAAFE($(D*~(B) -> 0xA2AE($B".(B) */
+	{ "\217\252\370", "\217\252\376", "\242\256", JISX0208KANJI },
+	/* 11-KU 0xABBC($(D+<(B) -> 0xA2AE($B".(B) */
+	{ "\217\253\274", NULL, "\242\256", JISX0208KANJI },
+	/* 11-KU 0xABC4($(D+D(B) -> 0xA2AE($B".(B) */
+	{ "\217\253\304", NULL, "\242\256", JISX0208KANJI },
+	/* 11-KU 0xABF8($(D+x(B)-0xABFE($(D+~(B) -> 0xA2AE($B".(B) */
+	{ "\217\253\370", "\217\253\376", "\242\256", JISX0208KANJI },
+	/* 12-KU 0xACA1($(D,!(B)-0xACFE($(D,~(B) -> 0xA2AE($B".(B) */
+	{ "\217\254\241", "\217\254\376", "\242\256", JISX0208KANJI },
+	/* 13-KU 0xADA1($(D-!(B)-0xADFE($(D-~(B) -> 0xA2AE($B".(B) */
+	{ "\217\255\241", "\217\255\376", "\242\256", JISX0208KANJI },
+	/* 14-KU 0xAEA1($(D.!(B)-0xAEFE($(D.~(B) -> 0xA2AE($B".(B) */
+	{ "\217\256\241", "\217\256\376", "\242\256", JISX0208KANJI },
+	/* 15-KU 0xAFA1($(D/!(B)-0xAFFE($(D/~(B) -> 0xA2AE($B".(B) */
+	{ "\217\257\241", "\217\257\376", "\242\256", JISX0208KANJI },
+	/* 77-KU 0xEDE4($(Dmd(B)-0xEDFE($(Dm~(B) -> 0xA2AE($B".(B) */
+	{ "\217\355\344", "\217\355\376", "\242\256", JISX0208KANJI },
+	/* 78-KU 0xEEA1($(Dn!(B)-0xEEFE($(Dn~(B) -> 0xA2AE($B".(B) */
+	{ "\217\356\241", "\217\356\376", "\242\256", JISX0208KANJI },
+	/* 79-KU 0xEFA1($(Do!(B)-0xEFFE($(Do~(B) -> 0xA2AE($B".(B) */
+	{ "\217\357\241", "\217\357\376", "\242\256", JISX0208KANJI },
+	/* 80-KU 0xF0A1($(Dp!(B)-0xF0FE($(Dp~(B) -> 0xA2AE($B".(B) */
+	{ "\217\360\241", "\217\360\376", "\242\256", JISX0208KANJI },
+	/* 81-KU 0xF1A1($(Dq!(B)-0xF1FE($(Dq~(B) -> 0xA2AE($B".(B) */
+	{ "\217\361\241", "\217\361\376", "\242\256", JISX0208KANJI },
+	/* 82-KU 0xF2A1($(Dr!(B)-0xF2FE($(Dr~(B) -> 0xA2AE($B".(B) */
+	{ "\217\362\241", "\217\362\376", "\242\256", JISX0208KANJI },
+	/* 83-KU 0xF3A1($(Ds!(B)-0xF3FE($(Ds~(B) -> 0xA2AE($B".(B) */
+	{ "\217\363\241", "\217\363\376", "\242\256", JISX0208KANJI },
+	/* 84-KU 0xF4A1($(Dt!(B)-0xF4FE($(Dt~(B) -> 0xA2AE($B".(B) */
+	{ "\217\364\241", "\217\364\376", "\242\256", JISX0208KANJI },
+	/* 85-KU 0xF5A1($(Du!(B)-0xF5FE($(Du~(B) -> 0xA2AE($B".(B) */
+	{ "\217\365\241", "\217\365\376", "\242\256", JISX0208KANJI },
+	/* 86-KU 0xF6A1($(Dv!(B)-0xF6FE($(Dv~(B) -> 0xA2AE($B".(B) */
+	{ "\217\366\241", "\217\366\376", "\242\256", JISX0208KANJI },
+	/* 87-KU 0xF7A1($(Dw!(B)-0xF7FE($(Dw~(B) -> 0xA2AE($B".(B) */
+	{ "\217\367\241", "\217\367\376", "\242\256", JISX0208KANJI },
+	/* 88-KU 0xF8A1($(Dx!(B)-0xF8FE($(Dx~(B) -> 0xA2AE($B".(B) */
+	{ "\217\370\241", "\217\370\376", "\242\256", JISX0208KANJI },
+	/* 89-KU 0xF9A1($(Dy!(B)-0xF9FE($(Dy~(B) -> 0xA2AE($B".(B) */
+	{ "\217\371\241", "\217\371\376", "\242\256", JISX0208KANJI },
+	/* 90-KU 0xFAA1($(Dz!(B)-0xFAFE($(Dz~(B) -> 0xA2AE($B".(B) */
+	{ "\217\372\241", "\217\372\376", "\242\256", JISX0208KANJI },
+	/* 91-KU 0xFBA1($(D{!(B)-0xFBFE($(D{~(B) -> 0xA2AE($B".(B) */
+	{ "\217\373\241", "\217\373\376", "\242\256", JISX0208KANJI },
+	/* 92-KU 0xFCA1($(D|!(B)-0xFCFE($(D|~(B) -> 0xA2AE($B".(B) */
+	{ "\217\374\241", "\217\374\376", "\242\256", JISX0208KANJI },
+	/* 93-KU 0xFDA1($(D}!(B)-0xFDFE($(D}~(B) -> 0xA2AE($B".(B) */
+	{ "\217\375\241", "\217\375\376", "\242\256", JISX0208KANJI },
+	/* 94-KU 0xFEA1($(D~!(B)-0xFEFE($(D~~(B) -> 0xA2AE($B".(B) */
+	{ "\217\376\241", "\217\376\376", "\242\256", JISX0208KANJI },
+
 	/* NULL */
 	{ 0, 0, 0, 0 }
 };
@@ -1394,6 +1609,12 @@
 			return 0;
 		else
 			return 1;
+	} else if (CS2CHARSET(*ics) == JISX0212KANJISUP) {
+		ptab = find_convtab(&etable_jisx0212, istr);
+		if (ptab)
+			return 0;
+		else
+			return 1;
 	} else if (CS2CHARSET(*ics) == SJIS) {
 		/* eliminate wrong codes */
 		ptab = find_convtab(&etable_sjis, istr);
@@ -1408,79 +1629,6 @@
 			return 0;
 		else
 			return 1;
-		/* TODO: G2 */
-	}
-}
-
-void cheliminate_cs(istr, ics, ostr, ocs)
-char* istr;
-CHARSET* ics;
-char* ostr;
-CHARSET* ocs;
-{
-	int i;
-	convtab* ptab;
-
-	if (istr[0] == NULCH && CSISNULLCS(ics[0])) {
-		ostr[0] = NULCH;
-		ocs[0] = NULLCS;
-		return;
-	}
-	/* initialize output buffer */
-	i = 0;
-	do {
-		ostr[i] = istr[i];
-		ocs[i] = ics[i];
-		i++;
-	} while (CSISREST(ics[i]));
-	ostr[i] = NULCH;
-	ocs[i] = NULLCS;
-	/* eliminate wrong codes if it is some traditional character set */
-	if (CS2CHARSET(*ocs) == JISX0208_78KANJI) {
-		/* eliminate wrong codes */
-		ptab = find_convtab(&etable_jisx0208_78, ostr);
-		if (ptab) {
-			ostr[0] = ptab->output[0];
-			ostr[1] = ptab->output[1];
-			ocs[0] = ptab->charset;
-			ocs[1] = ptab->charset | REST_MASK;
-		}
-	} else if (CS2CHARSET(*ocs) == JISX0208KANJI) {
-		/* eliminate wrong codes */
-		ptab = find_convtab(&etable_jisx0208_83, ostr);
-		if (ptab) {
-			ostr[0] = ptab->output[0];
-			ostr[1] = ptab->output[1];
-			ocs[0] = ptab->charset;
-			ocs[1] = ptab->charset | REST_MASK;
-		}
-	} else if (CS2CHARSET(*ocs) == JISX0208_90KANJI) {
-		/* eliminate wrong codes */
-		ptab = find_convtab(&etable_jisx0208_90, ostr);
-		if (ptab) {
-			ostr[0] = ptab->output[0];
-			ostr[1] = ptab->output[1];
-			ocs[0] = ptab->charset;
-			ocs[1] = ptab->charset | REST_MASK;
-		}
-	} else if (CS2CHARSET(*ocs) == SJIS) {
-		/* eliminate wrong codes */
-		ptab = find_convtab(&etable_sjis, ostr);
-		if (ptab) {
-			ostr[0] = ptab->output[0];
-			ostr[1] = ptab->output[1];
-			ocs[0] = ptab->charset;
-			ocs[1] = ptab->charset | REST_MASK;
-		}
-	} else if (CS2CHARSET(*ocs) == UJIS) {
-		/* eliminate wrong codes */
-		ptab = find_convtab(&etable_ujis, ostr);
-		if (ptab) {
-			ostr[0] = ptab->output[0];
-			ostr[1] = ptab->output[1];
-			ocs[0] = ptab->charset;
-			ocs[1] = ptab->charset | REST_MASK;
-		}
 		/* TODO: G2 */
 	}
 }
Index: less/version.c
diff -u less/version.c:1.86 less/version.c:1.87
--- less/version.c:1.86	Sat Aug  8 12:25:05 1998
+++ less/version.c	Wed Aug 12 18:53:41 1998
@@ -638,7 +638,9 @@
 iso246 8/8/98	Add one locale for Win32, eliminate all MSB_ENABLE stuff
 		from unify.c, and fix eliminating table for JIS X0208.1978.
 iso247 8/8/98	Add -W option.  And change the point of putting a mark.  Now
-		multi.c call checking function, them mark wrong characters.
+		multi.c call checking function, then mark wrong characters.
+iso248 8/12/98	Fix a problem of outputting WRONGCS.  Add checking table
+		for JIS X0212.1990.
 */
 
-char version[] = "332+iso247";
+char version[] = "332+iso248";
