changeset 23930:a9f9015b5b83

(read_process_output): Decide the multibyteness of string given to a process filter by a coding system used for decoding the process output.
author Kenichi Handa <handa@m17n.org>
date Tue, 22 Dec 1998 06:06:48 +0000
parents 869b3e83aa6b
children 5fea9ce6601a
files src/process.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Mon Dec 21 16:13:57 1998 +0000
+++ b/src/process.c	Tue Dec 22 06:06:48 1998 +0000
@@ -2994,7 +2994,14 @@
 	 save the match data in a special nonrecursive fashion.  */
       running_asynch_code = 1;
 
-      text = make_string_from_bytes (chars, nchars, nbytes);
+      /* The multibyteness of a string given to the filter is decided
+         by which coding system we used for decoding.  */
+      if (coding->type == coding_type_no_conversion
+	  || coding->type == coding_type_raw_text)
+	text = make_unibyte_string (chars, nbytes);
+      else
+	text = make_multibyte_string (chars, nchars, nbytes);
+
       internal_condition_case_1 (read_process_output_call,
 				 Fcons (outstream,
 					Fcons (proc, Fcons (text, Qnil))),