diff options
| author | Kenichi Handa | 1998-07-09 02:02:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-07-09 02:02:33 +0000 |
| commit | 85bbb1345a7a7e819599f50d170cfe8a41de4ee5 (patch) | |
| tree | d66eba62e761f39e005e9774f9af1c56c875fb3f | |
| parent | 061bda8dfd24c7f4c6396941d4352264c543613e (diff) | |
| download | emacs-85bbb1345a7a7e819599f50d170cfe8a41de4ee5.tar.gz emacs-85bbb1345a7a7e819599f50d170cfe8a41de4ee5.zip | |
(DECODE_ISO_CHARACTER): While decoding two-byte code,
if the sencond byte is invalid, produce the first byte as is.
| -rw-r--r-- | src/coding.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c index 6c537df830c..81fda21f1cb 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -884,21 +884,21 @@ detect_coding_iso2022 (src, src_end) | |||
| 884 | *dst++ = 0xFF; \ | 884 | *dst++ = 0xFF; \ |
| 885 | coding->composing += 2; \ | 885 | coding->composing += 2; \ |
| 886 | } \ | 886 | } \ |
| 887 | if ((charset) >= 0) \ | 887 | if (charset_alt >= 0) \ |
| 888 | { \ | 888 | { \ |
| 889 | if (CHARSET_DIMENSION (charset) == 2) \ | 889 | if (CHARSET_DIMENSION (charset_alt) == 2) \ |
| 890 | { \ | 890 | { \ |
| 891 | ONE_MORE_BYTE (c2); \ | 891 | ONE_MORE_BYTE (c2); \ |
| 892 | if (iso_code_class[(c2) & 0x7F] != ISO_0x20_or_0x7F \ | 892 | if (iso_code_class[(c2) & 0x7F] != ISO_0x20_or_0x7F \ |
| 893 | && iso_code_class[(c2) & 0x7F] != ISO_graphic_plane_0) \ | 893 | && iso_code_class[(c2) & 0x7F] != ISO_graphic_plane_0) \ |
| 894 | { \ | 894 | { \ |
| 895 | src--; \ | 895 | src--; \ |
| 896 | c2 = ' '; \ | 896 | charset_alt = CHARSET_ASCII; \ |
| 897 | } \ | 897 | } \ |
| 898 | } \ | 898 | } \ |
| 899 | if (!NILP (translation_table) \ | 899 | if (!NILP (translation_table) \ |
| 900 | && ((c_alt = translate_char (translation_table, \ | 900 | && ((c_alt = translate_char (translation_table, \ |
| 901 | -1, (charset), c1, c2)) >= 0)) \ | 901 | -1, charset_alt, c1, c2)) >= 0)) \ |
| 902 | SPLIT_CHAR (c_alt, charset_alt, c1, c2); \ | 902 | SPLIT_CHAR (c_alt, charset_alt, c1, c2); \ |
| 903 | } \ | 903 | } \ |
| 904 | if (charset_alt == CHARSET_ASCII || charset_alt < 0) \ | 904 | if (charset_alt == CHARSET_ASCII || charset_alt < 0) \ |