aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2013-04-25 00:09:49 +0900
committerKenichi Handa2013-04-25 00:09:49 +0900
commitec5098562a018551a4ec9652fa7658304b1bbe59 (patch)
tree4979bccd23972c63dd39521863649d64996102b2 /src
parent1ffefcf908c9452b752a35306d29eca48c723149 (diff)
downloademacs-ec5098562a018551a4ec9652fa7658304b1bbe59.tar.gz
emacs-ec5098562a018551a4ec9652fa7658304b1bbe59.zip
coding.c (decode_coding_iso_2022): When an invalid escape sequence is encountered, reset the invocation and designation status to the safest one.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/coding.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 31764cad485..99e2c3d9a84 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12013-04-24 Kenichi Handa <handa@gnu.org>
2
3 * coding.c (decode_coding_iso_2022): When an invalid escape
4 sequence is encountered, reset the invocation and designation
5 status to the safest one.
6
12013-04-22 Paul Eggert <eggert@cs.ucla.edu> 72013-04-22 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 * Makefile.in (bootstrap-clean): Remove stamp-h1 too. 9 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
diff --git a/src/coding.c b/src/coding.c
index f9799035b3c..b9fb92c481b 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3887,6 +3887,14 @@ decode_coding_iso_2022 (struct coding_system *coding)
3887 *charbuf++ = c < 0 ? -c : ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c); 3887 *charbuf++ = c < 0 ? -c : ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c);
3888 char_offset++; 3888 char_offset++;
3889 coding->errors++; 3889 coding->errors++;
3890 /* Reset the invocation and designation status to the safest
3891 one; i.e. designate ASCII to the graphic register 0, and
3892 invoke that register to the graphic plane 0. This typically
3893 helps the case that an designation sequence for ASCII "ESC (
3894 B" is somehow broken (e.g. broken by a newline). */
3895 CODING_ISO_INVOCATION (coding, 0) = 0;
3896 CODING_ISO_DESIGNATION (coding, 0) = charset_ascii;
3897 charset_id_0 = charset_ascii;
3890 continue; 3898 continue;
3891 3899
3892 break_loop: 3900 break_loop: