Fix EUC encoding conversion for codeset 3 and 4 to comply to the specification.

PR:		28552
Submitted by:	NIIMI Satoshi <sa2c@and.or.jp>
This commit is contained in:
Jeroen Ruigrok van der Werven 2002-04-07 16:37:15 +00:00
parent 9933dd4a4d
commit a243e676fe

View File

@ -123,6 +123,8 @@ _EUC_init(rl)
#define _SS2 0x008e
#define _SS3 0x008f
#define GR_BITS 0x80808080 /* XXX: to be fixed */
static inline int
_euc_set(c)
u_int c;
@ -202,6 +204,8 @@ _EUC_sputrune(c, string, n, result)
}
*string++ = _SS2;
--i;
/* SS2 designates G2 into GR */
nm |= GR_BITS;
} else
if (m == CEI->bits[3]) {
i = len = CEI->count[3];
@ -212,6 +216,8 @@ _EUC_sputrune(c, string, n, result)
}
*string++ = _SS3;
--i;
/* SS3 designates G3 into GR */
nm |= GR_BITS;
} else
goto CodeSet1; /* Bletch */
while (i-- > 0)