diff options
| author | Kenichi Handa | 2000-09-07 01:14:20 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-09-07 01:14:20 +0000 |
| commit | d69864bf3ee0b990101fee34f3dc857cf3f13ea4 (patch) | |
| tree | 2072cc8ca8a5d14a834253cab202bca42642d67c /src | |
| parent | d24fd56ff11d649c8b854c0d3e05530c86709bee (diff) | |
| download | emacs-d69864bf3ee0b990101fee34f3dc857cf3f13ea4.tar.gz emacs-d69864bf3ee0b990101fee34f3dc857cf3f13ea4.zip | |
(read_process_output): Before inserting the decoded
text in the buffer, adjust the multibyteness.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 6 |
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) | |||
| 3075 | bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data, | 3075 | bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data, |
| 3076 | carryover); | 3076 | carryover); |
| 3077 | XSETINT (p->decoding_carryover, carryover); | 3077 | XSETINT (p->decoding_carryover, carryover); |
| 3078 | /* Adjust the multibyteness of TEXT to that of the buffer. */ | ||
| 3079 | if (NILP (current_buffer->enable_multibyte_characters) | ||
| 3080 | != ! STRING_MULTIBYTE (text)) | ||
| 3081 | text = (STRING_MULTIBYTE (text) | ||
| 3082 | ? Fstring_as_unibyte (text) | ||
| 3083 | : Fstring_as_multibyte (text)); | ||
| 3078 | nbytes = STRING_BYTES (XSTRING (text)); | 3084 | nbytes = STRING_BYTES (XSTRING (text)); |
| 3079 | nchars = XSTRING (text)->size; | 3085 | nchars = XSTRING (text)->size; |
| 3080 | insert_from_string_before_markers (text, 0, 0, nchars, nbytes, 0); | 3086 | insert_from_string_before_markers (text, 0, 0, nchars, nbytes, 0); |