From: Kenichi Handa Date: Tue, 22 Dec 1998 06:06:48 +0000 (+0000) Subject: (read_process_output): Decide the multibyteness of X-Git-Tag: emacs-20.4~1019 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=51c6067d9b84d32e0ef3b572600c0c9576f497d7;p=emacs.git (read_process_output): Decide the multibyteness of string given to a process filter by a coding system used for decoding the process output. --- 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))),