From 58d9ddfc7d66fec54f2159f55a6d7ab01d993137 Mon Sep 17 00:00:00 2001 From: asmodai Date: Sun, 7 Apr 2002 16:37:15 +0000 Subject: Fix EUC encoding conversion for codeset 3 and 4 to comply to the specification. PR: 28552 Submitted by: NIIMI Satoshi --- lib/libc/locale/euc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/libc/locale/euc.c b/lib/libc/locale/euc.c index 961bd73..f2ae003 100644 --- a/lib/libc/locale/euc.c +++ b/lib/libc/locale/euc.c @@ -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 @@ CodeSet1: } *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 @@ CodeSet1: } *string++ = _SS3; --i; + /* SS3 designates G3 into GR */ + nm |= GR_BITS; } else goto CodeSet1; /* Bletch */ while (i-- > 0) -- cgit v1.1