aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c
index 24c6ef0b6b1..53661fc33cc 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5577,6 +5577,8 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace)
5577 inhibit_modification_hooks = saved_inhibit_modification_hooks; 5577 inhibit_modification_hooks = saved_inhibit_modification_hooks;
5578 } 5578 }
5579 5579
5580 coding->heading_ascii = 0;
5581
5580 if (! encodep && CODING_REQUIRE_DETECTION (coding)) 5582 if (! encodep && CODING_REQUIRE_DETECTION (coding))
5581 { 5583 {
5582 /* We must detect encoding of text and eol format. */ 5584 /* We must detect encoding of text and eol format. */
@@ -6221,6 +6223,8 @@ decode_coding_string (str, coding, nocopy)
6221 saved_coding_symbol = coding->symbol; 6223 saved_coding_symbol = coding->symbol;
6222 coding->src_multibyte = STRING_MULTIBYTE (str); 6224 coding->src_multibyte = STRING_MULTIBYTE (str);
6223 coding->dst_multibyte = 1; 6225 coding->dst_multibyte = 1;
6226 coding->heading_ascii = 0;
6227
6224 if (CODING_REQUIRE_DETECTION (coding)) 6228 if (CODING_REQUIRE_DETECTION (coding))
6225 { 6229 {
6226 /* See the comments in code_convert_region. */ 6230 /* See the comments in code_convert_region. */
@@ -6433,6 +6437,7 @@ encode_coding_string (str, coding, nocopy)
6433 /* Try to skip the heading and tailing ASCIIs. We can't skip them 6437 /* Try to skip the heading and tailing ASCIIs. We can't skip them
6434 if we must run CCL program or there are compositions to 6438 if we must run CCL program or there are compositions to
6435 encode. */ 6439 encode. */
6440 coding->heading_ascii = 0;
6436 if (coding->type != coding_type_ccl 6441 if (coding->type != coding_type_ccl
6437 && (! coding->cmp_data || coding->cmp_data->used == 0)) 6442 && (! coding->cmp_data || coding->cmp_data->used == 0))
6438 { 6443 {
@@ -7270,7 +7275,7 @@ Return the corresponding character. */)
7270} 7275}
7271 7276
7272DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0, 7277DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0,
7273 doc: /* Encode a Japanese character CHAR to shift_jis encoding. 7278 doc: /* Encode a Japanese character CH to shift_jis encoding.
7274Return the corresponding code in SJIS. */) 7279Return the corresponding code in SJIS. */)
7275 (ch) 7280 (ch)
7276 Lisp_Object ch; 7281 Lisp_Object ch;
@@ -7330,7 +7335,7 @@ Return the corresponding character. */)
7330} 7335}
7331 7336
7332DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0, 7337DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0,
7333 doc: /* Encode the Big5 character CHAR to BIG5 coding system. 7338 doc: /* Encode the Big5 character CH to BIG5 coding system.
7334Return the corresponding character code in Big5. */) 7339Return the corresponding character code in Big5. */)
7335 (ch) 7340 (ch)
7336 Lisp_Object ch; 7341 Lisp_Object ch;