(copy_text): To convert a non-ASCII char to unibyte,
authorKenichi Handa <handa@m17n.org>
Tue, 30 Dec 2008 01:48:56 +0000 (01:48 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 30 Dec 2008 01:48:56 +0000 (01:48 +0000)
just get the low 8-bit of the code.

src/ChangeLog
src/insdel.c

index e362b32..4315a17 100644 (file)
@@ -1,5 +1,8 @@
 2008-12-30  Kenichi Handa  <handa@m17n.org>
 
+       * insdel.c (copy_text): To convert a non-ASCII char to unibyte,
+       just get the low 8-bit of the code.
+
        * font.c (font_intern_prop): Validate str as multibyte.
 
 2008-12-29  Dan Nicolaescu  <dann@ics.uci.edu>
index a41f03b..3483ad6 100644 (file)
@@ -655,8 +655,8 @@ copy_text (from_addr, to_addr, nbytes,
        {
          int thislen, c;
          c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen);
-         if (!ASCII_CHAR_P (c))
-           c = multibyte_char_to_unibyte (c, tbl);
+         if (! ASCII_CHAR_P (c))
+           c &= 0xFF;
          *to_addr++ = c;
          from_addr += thislen;
          bytes_left -= thislen;