aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c
index 35f85052c98..a7b040e2712 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7423,10 +7423,23 @@ decode_coding (struct coding_system *coding)
7423 7423
7424 while (nbytes-- > 0) 7424 while (nbytes-- > 0)
7425 { 7425 {
7426 int c = *src++; 7426 int c;
7427 7427
7428 if (c & 0x80) 7428 /* Copy raw bytes in their 2-byte forms from multibyte
7429 c = BYTE8_TO_CHAR (c); 7429 text as single characters. */
7430 if (coding->src_multibyte
7431 && CHAR_BYTE8_HEAD_P (*src) && nbytes > 0)
7432 {
7433 c = STRING_CHAR_ADVANCE (src);
7434 nbytes--;
7435 }
7436 else
7437 {
7438 c = *src++;
7439
7440 if (c & 0x80)
7441 c = BYTE8_TO_CHAR (c);
7442 }
7430 coding->charbuf[coding->charbuf_used++] = c; 7443 coding->charbuf[coding->charbuf_used++] = c;
7431 } 7444 }
7432 produce_chars (coding, Qnil, 1); 7445 produce_chars (coding, Qnil, 1);