(Finsert_file_contents): In the case of replace,

remeber the coding system used for decoding in coding_system.
This commit is contained in:
Kenichi Handa 2009-01-07 12:28:19 +00:00
parent 7f0995a11b
commit 50b0622194
2 changed files with 5 additions and 0 deletions

View file

@ -1,5 +1,9 @@
2009-01-07 Kenichi Handa <handa@m17n.org>
* fileio.c (Finsert_file_contents): In the case of replace,
remeber the coding system used for decoding in
coding_system (Bug#1039).
* coding.c (decode_coding_utf_8): Check byte_after_cr before
breaking the loop. (Bug#870)
(decode_coding_utf_16, decode_coding_emacs_mule)

View file

@ -3687,6 +3687,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
coding.mode &= ~CODING_MODE_LAST_BLOCK;
}
coding_system = CODING_ID_NAME (coding.id);
decoded = BUF_BEG_ADDR (XBUFFER (conversion_buffer));
inserted = (BUF_Z_BYTE (XBUFFER (conversion_buffer))
- BUF_BEG_BYTE (XBUFFER (conversion_buffer)));