(copy_text): When copying from multibyte to unibyte, do
authorKenichi Handa <handa@m17n.org>
Wed, 4 Feb 1998 11:23:28 +0000 (11:23 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 4 Feb 1998 11:23:28 +0000 (11:23 +0000)
not alter ASCII characters.

src/insdel.c

index aaf5de3..805200a 100644 (file)
@@ -574,7 +574,7 @@ copy_text (from_addr, to_addr, nbytes,
        {
          int thislen, c;
          c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen);
-         *to_addr++ = (c & 0177) + 0200;
+         *to_addr++ = SINGLE_BYTE_CHAR_P (c) ? c : (c & 0177) + 0200;
          from_addr += thislen;
          bytes_left--;
          nchars++;