From c0072bfb9d2952b1ee39f2b03fa2e69e6727971f Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 25 Jun 1999 07:54:52 +0000 Subject: [PATCH] (ccl_driver): Fix `CCL_WriteMultibyteChar2'. --- src/mule-ccl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mule-ccl.c b/src/mule-ccl.c index f45e036..356c7de 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -1239,12 +1239,13 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, else if (i == CHARSET_COMPOSITION) i = MAKE_COMPOSITE_CHAR (reg[rrr]); #endif - else if (REP_BYTES_BY_FIRST_BYTE (i) == 1) - i = ((i - 0x70) << 7) | (reg[rrr] & 0x7F); + else if (XCHARSET_DIMENSION (CHARSET_BY_LEADING_BYTE (i)) == 1) + i = ((i - FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7) + | (reg[rrr] & 0x7F); else if (i < MIN_LEADING_BYTE_OFFICIAL_2) - i = ((i - 0x8F) << 14) | reg[rrr]; + i = ((i - FIELD1_TO_OFFICIAL_LEADING_BYTE) << 14) | reg[rrr]; else - i = ((i - 0xE0) << 14) | reg[rrr]; + i = ((i - FIELD1_TO_PRIVATE_LEADING_BYTE) << 14) | reg[rrr]; CCL_WRITE_CHAR (i); -- 1.7.10.4