to_byte = STRING_BYTES (XSTRING (str));
saved_coding_symbol = Qnil;
+ coding->src_multibyte = STRING_MULTIBYTE (str);
+ coding->dst_multibyte = 1;
if (CODING_REQUIRE_DETECTION (coding))
{
/* See the comments in code_convert_region. */
}
}
- coding->src_multibyte = 0;
- coding->dst_multibyte = (coding->type != coding_type_no_conversion
- && coding->type != coding_type_raw_text);
+ if (coding->type == coding_type_no_conversion
+ || coding->type == coding_type_raw_text)
+ coding->dst_multibyte = 0;
+
require_decoding = CODING_REQUIRE_DECODING (coding);
if (STRING_MULTIBYTE (str))
str = Fstring_as_unibyte (str);
to_byte = STRING_BYTES (XSTRING (str));
nocopy = 1;
+ coding->src_multibyte = 0;
}
/* Try to skip the heading and tailing ASCIIs. */