mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 15:00:45 -08:00
(read_process_output): Before inserting the decoded
text in the buffer, adjust the multibyteness.
This commit is contained in:
parent
d24fd56ff1
commit
d69864bf3e
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue