changeset 89527:7ca60ab7a039

(concat): Don't change multibyteness of the result by concatenating an 8-bit character.
author Kenichi Handa <handa@m17n.org>
date Fri, 26 Sep 2003 11:21:21 +0000
parents 58eb89f2fdfc
children c75e3c6b608a
files src/fns.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Fri Sep 26 11:20:13 2003 +0000
+++ b/src/fns.c	Fri Sep 26 11:21:21 2003 +0000
@@ -591,7 +591,7 @@
 		  wrong_type_argument (Qcharacterp, ch);
 		this_len_byte = CHAR_BYTES (XINT (ch));
 		result_len_byte += this_len_byte;
-		if (! ASCII_CHAR_P (XINT (ch)))
+		if (! ASCII_CHAR_P (XINT (ch)) && ! CHAR_BYTE8_P (XINT (ch)))
 		  some_multibyte = 1;
 	      }
 	  else if (BOOL_VECTOR_P (this) && XBOOL_VECTOR (this)->size > 0)
@@ -604,7 +604,7 @@
 		  wrong_type_argument (Qcharacterp, ch);
 		this_len_byte = CHAR_BYTES (XINT (ch));
 		result_len_byte += this_len_byte;
-		if (! ASCII_CHAR_P (XINT (ch)))
+		if (! ASCII_CHAR_P (XINT (ch)) && ! CHAR_BYTE8_P (XINT (ch)))
 		  some_multibyte = 1;
 	      }
 	  else if (STRINGP (this))