]> git.eshelyaron.com Git - emacs.git/commitdiff
(CCL_READ_CHAR): If source is multibyte, pay attention to
authorKenichi Handa <handa@m17n.org>
Fri, 11 Aug 2000 05:44:50 +0000 (05:44 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 11 Aug 2000 05:44:50 +0000 (05:44 +0000)
the multibyte form of eight-bit-control characters.
(Fccl_execute_on_string): Initialize ccl->multibyte.

src/ccl.c

index e44dc86643b0f8e87abc09b1f2dcf508237edd47..c99c0a5414c2111b85f25afe0a86d1e234fb1b8e 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -713,7 +713,12 @@ static tr_stack *mapping_stack_pointer;
     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 @@ is a unibyte string.  By default it is a multibyte string.")
   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++)