aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2002-05-14 08:00:53 +0000
committerKenichi Handa2002-05-14 08:00:53 +0000
commit004068e4fc1d272f97cba4a49cbf47b606723ec0 (patch)
treeccafa727b3c72c032d7ece52485068372fb987f3 /src/coding.c
parent6abd9323c6c34de7e4be6e0868534357116e925a (diff)
downloademacs-004068e4fc1d272f97cba4a49cbf47b606723ec0.tar.gz
emacs-004068e4fc1d272f97cba4a49cbf47b606723ec0.zip
(Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
handling of charset list. (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c
index 8381284fc98..b29e40d801b 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3433,6 +3433,9 @@ encode_coding_iso_2022 (coding)
3433 int c; 3433 int c;
3434 3434
3435 CODING_GET_INFO (coding, attrs, eol_type, charset_list); 3435 CODING_GET_INFO (coding, attrs, eol_type, charset_list);
3436 setup_iso_safe_charsets (attrs);
3437 coding->safe_charsets
3438 = (char *) XSTRING (CODING_ATTR_SAFE_CHARSETS(attrs))->data;
3436 3439
3437 ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)); 3440 ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs));
3438 3441
@@ -6811,8 +6814,8 @@ Return the corresponding character. */)
6811 6814
6812 val = CODING_ATTR_CHARSET_LIST (attrs); 6815 val = CODING_ATTR_CHARSET_LIST (attrs);
6813 charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 6816 charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
6814 charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 6817 charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
6815 charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))); 6818 charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val)));
6816 6819
6817 if (c <= 0x7F) 6820 if (c <= 0x7F)
6818 charset = charset_roman; 6821 charset = charset_roman;
@@ -6823,7 +6826,7 @@ Return the corresponding character. */)
6823 } 6826 }
6824 else 6827 else
6825 { 6828 {
6826 int s1 = c >> 8, s2 = c & 0x7F; 6829 int s1 = c >> 8, s2 = c & 0xFF;
6827 6830
6828 if (s1 < 0x81 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF 6831 if (s1 < 0x81 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF
6829 || s2 < 0x40 || s2 == 0x7F || s2 > 0xFC) 6832 || s2 < 0x40 || s2 == 0x7F || s2 > 0xFC)