From 51c6067d9b84d32e0ef3b572600c0c9576f497d7 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 22 Dec 1998 06:06:48 +0000 Subject: [PATCH] (read_process_output): Decide the multibyteness of string given to a process filter by a coding system used for decoding the process output. --- src/process.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index 941e0a266d9..90a5a2f5114 100644 --- a/src/process.c +++ b/src/process.c @@ -2994,7 +2994,14 @@ read_process_output (proc, channel) 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))), -- 2.39.2