From: Kenichi Handa Date: Tue, 30 Dec 2008 01:48:56 +0000 (+0000) Subject: (copy_text): To convert a non-ASCII char to unibyte, X-Git-Tag: emacs-pretest-23.0.90~815 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1ede3eb64ba10005fd1b3fd9d7d5e81561c99c55;p=emacs.git (copy_text): To convert a non-ASCII char to unibyte, just get the low 8-bit of the code. --- diff --git a/src/ChangeLog b/src/ChangeLog index e362b323d97..4315a179a2f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-12-30 Kenichi Handa + * 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 diff --git a/src/insdel.c b/src/insdel.c index a41f03b1ba4..3483ad668cf 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -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;