changeset 30754:4687d69de88a

(CCL_READ_CHAR): If source is multibyte, pay attention to the multibyte form of eight-bit-control characters. (Fccl_execute_on_string): Initialize ccl->multibyte.
author Kenichi Handa <handa@m17n.org>
date Fri, 11 Aug 2000 05:44:50 +0000
parents bc668ba63d2a
children c9a72e24976c
files src/ccl.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ccl.c	Fri Aug 11 05:44:20 2000 +0000
+++ b/src/ccl.c	Fri Aug 11 05:44:50 2000 +0000
@@ -713,7 +713,12 @@
     if (!src)					\
       CCL_INVALID_CMD;				\
     else if (src < src_end)			\
-      r = *src++;				\
+      {						\
+	r = *src++;				\
+	if (r == LEADING_CODE_8_BIT_CONTROL	\
+	    && ccl->multibyte)			\
+	  r = *src++ - 0x20;			\
+      }						\
     else if (ccl->last_block)			\
       {						\
         ic = ccl->eof_ic;			\
@@ -1895,6 +1900,7 @@
   outbufsize = STRING_BYTES (XSTRING (str)) * ccl.buf_magnification + 256;
   outbuf = (char *) xmalloc (outbufsize);
   ccl.last_block = NILP (contin);
+  ccl.multibyte = STRING_MULTIBYTE (str);
   produced = ccl_driver (&ccl, XSTRING (str)->data, outbuf,
 			 STRING_BYTES (XSTRING (str)), outbufsize, (int *)0);
   for (i = 0; i < 8; i++)