summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2002-04-07 16:37:15 +0000
committerasmodai <asmodai@FreeBSD.org>2002-04-07 16:37:15 +0000
commit58d9ddfc7d66fec54f2159f55a6d7ab01d993137 (patch)
tree9fee070ac3a9e7416e8c7223e4567bf80f339223 /lib/libc
parentf7712cdcf512ce307ea97b7a328c1c4c7a3569b9 (diff)
downloadFreeBSD-src-58d9ddfc7d66fec54f2159f55a6d7ab01d993137.zip
FreeBSD-src-58d9ddfc7d66fec54f2159f55a6d7ab01d993137.tar.gz
Fix EUC encoding conversion for codeset 3 and 4 to comply to the specification.
PR: 28552 Submitted by: NIIMI Satoshi <sa2c@and.or.jp>
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/euc.c6
1 files changed, 6 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud