Mercurial > emacs
comparison src/coding.c @ 22717:3e3949ac4cfb
(DECODE_ISO_CHARACTER): While decoding two-byte code,
if the sencond byte is invalid, produce the first byte as is.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 09 Jul 1998 02:02:33 +0000 |
parents | c493ce6a31e4 |
children | 04b653d7f842 |
comparison
equal
deleted
inserted
replaced
22716:2d00337b7152 | 22717:3e3949ac4cfb |
---|---|
882 if (COMPOSING_WITH_RULE_P (coding->composing)) \ | 882 if (COMPOSING_WITH_RULE_P (coding->composing)) \ |
883 /* To tell composition rules are embeded. */ \ | 883 /* To tell composition rules are embeded. */ \ |
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) \ |
905 DECODE_CHARACTER_ASCII (c1); \ | 905 DECODE_CHARACTER_ASCII (c1); \ |
906 else if (CHARSET_DIMENSION (charset_alt) == 1) \ | 906 else if (CHARSET_DIMENSION (charset_alt) == 1) \ |