diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/coding.c b/src/coding.c index 6d2e6d9c454..282f8e21e86 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5275,6 +5275,9 @@ decode_coding_string (str, coding, nocopy) | |||
| 5275 | } | 5275 | } |
| 5276 | } | 5276 | } |
| 5277 | 5277 | ||
| 5278 | coding->src_multibyte = 0; | ||
| 5279 | coding->dst_multibyte = (coding->type != coding_type_no_conversion | ||
| 5280 | && coding->type != coding_type_raw_text); | ||
| 5278 | require_decoding = CODING_REQUIRE_DECODING (coding); | 5281 | require_decoding = CODING_REQUIRE_DECODING (coding); |
| 5279 | 5282 | ||
| 5280 | if (STRING_MULTIBYTE (str)) | 5283 | if (STRING_MULTIBYTE (str)) |
| @@ -5284,9 +5287,6 @@ decode_coding_string (str, coding, nocopy) | |||
| 5284 | to_byte = STRING_BYTES (XSTRING (str)); | 5287 | to_byte = STRING_BYTES (XSTRING (str)); |
| 5285 | nocopy = 1; | 5288 | nocopy = 1; |
| 5286 | } | 5289 | } |
| 5287 | coding->src_multibyte = 0; | ||
| 5288 | coding->dst_multibyte = (coding->type != coding_type_no_conversion | ||
| 5289 | && coding->type != coding_type_raw_text); | ||
| 5290 | 5290 | ||
| 5291 | /* Try to skip the heading and tailing ASCIIs. */ | 5291 | /* Try to skip the heading and tailing ASCIIs. */ |
| 5292 | if (require_decoding && coding->type != coding_type_ccl) | 5292 | if (require_decoding && coding->type != coding_type_ccl) |
| @@ -5420,6 +5420,11 @@ encode_coding_string (str, coding, nocopy) | |||
| 5420 | to_byte = STRING_BYTES (XSTRING (str)); | 5420 | to_byte = STRING_BYTES (XSTRING (str)); |
| 5421 | 5421 | ||
| 5422 | saved_coding_symbol = Qnil; | 5422 | saved_coding_symbol = Qnil; |
| 5423 | |||
| 5424 | /* Encoding routines determine the multibyteness of the source text | ||
| 5425 | by coding->src_multibyte. */ | ||
| 5426 | coding->src_multibyte = STRING_MULTIBYTE (str); | ||
| 5427 | coding->dst_multibyte = 0; | ||
| 5423 | if (! CODING_REQUIRE_ENCODING (coding)) | 5428 | if (! CODING_REQUIRE_ENCODING (coding)) |
| 5424 | { | 5429 | { |
| 5425 | coding->consumed = STRING_BYTES (XSTRING (str)); | 5430 | coding->consumed = STRING_BYTES (XSTRING (str)); |
| @@ -5434,11 +5439,6 @@ encode_coding_string (str, coding, nocopy) | |||
| 5434 | return (nocopy ? str : Fcopy_sequence (str)); | 5439 | return (nocopy ? str : Fcopy_sequence (str)); |
| 5435 | } | 5440 | } |
| 5436 | 5441 | ||
| 5437 | /* Encoding routines determine the multibyteness of the source text | ||
| 5438 | by coding->src_multibyte. */ | ||
| 5439 | coding->src_multibyte = STRING_MULTIBYTE (str); | ||
| 5440 | coding->dst_multibyte = 0; | ||
| 5441 | |||
| 5442 | if (coding->composing != COMPOSITION_DISABLED) | 5442 | if (coding->composing != COMPOSITION_DISABLED) |
| 5443 | coding_save_composition (coding, from, to, str); | 5443 | coding_save_composition (coding, from, to, str); |
| 5444 | 5444 | ||