summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-09-07 01:14:20 +0000
committerKenichi Handa <handa@m17n.org>2000-09-07 01:14:20 +0000
commitd69864bf3ee0b990101fee34f3dc857cf3f13ea4 (patch)
tree2072cc8ca8a5d14a834253cab202bca42642d67c /src/process.c
parentd24fd56ff11d649c8b854c0d3e05530c86709bee (diff)
downloademacs-d69864bf3ee0b990101fee34f3dc857cf3f13ea4.tar.gz
(read_process_output): Before inserting the decoded
text in the buffer, adjust the multibyteness.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c
index 35fca18ff28..49dcaea467c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3075,6 +3075,12 @@ read_process_output (proc, channel)
bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data,
carryover);
XSETINT (p->decoding_carryover, carryover);
+ /* Adjust the multibyteness of TEXT to that of the buffer. */
+ if (NILP (current_buffer->enable_multibyte_characters)
+ != ! STRING_MULTIBYTE (text))
+ text = (STRING_MULTIBYTE (text)
+ ? Fstring_as_unibyte (text)
+ : Fstring_as_multibyte (text));
nbytes = STRING_BYTES (XSTRING (text));
nchars = XSTRING (text)->size;
insert_from_string_before_markers (text, 0, 0, nchars, nbytes, 0);