aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney <[email protected]>2009-02-28 13:52:03 +0000
committerJason Rumney <[email protected]>2009-02-28 13:52:03 +0000
commit237aabf40e931afa2f512efa2a80e4be5c3d2b2a (patch)
tree4b31496b315b4847cecc921cc62df90989f8c478
parent449148b381dd91f8e525d060310edaac252b44f0 (diff)
(detect_coding_charset): Fix last change for non-latin charsets.
-rw-r--r--src/coding.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/coding.c b/src/coding.c
index 176d115d44..01cdab52d0 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5102,12 +5102,12 @@ detect_coding_charset (coding, detect_info)
attrs = CODING_ID_ATTRS (coding->id);
valids = AREF (attrs, coding_attr_charset_valids);
name = CODING_ID_NAME (coding->id);
- if (VECTORP (Vlatin_extra_code_table)
- && (strncmp ((char *) SDATA (SYMBOL_NAME (name)),
- "iso-8859-", sizeof ("iso-8859-") - 1) == 0
- || strncmp ((char *) SDATA (SYMBOL_NAME (name)),
- "iso-latin-", sizeof ("iso-latin-") - 1) == 0))
+ if (strncmp ((char *) SDATA (SYMBOL_NAME (name)),
+ "iso-8859-", sizeof ("iso-8859-") - 1) == 0
+ || strncmp ((char *) SDATA (SYMBOL_NAME (name)),
+ "iso-latin-", sizeof ("iso-latin-") - 1) == 0)
check_latin_extra = 1;
+
if (! NILP (CODING_ATTR_ASCII_COMPAT (attrs)))
src += head_ascii;
@@ -5128,7 +5128,8 @@ detect_coding_charset (coding, detect_info)
if (c >= 0x80)
{
if (c < 0xA0
- && (!check_latin_extra
+ && check_latin_extra
+ && (!VECTORP (Vlatin_extra_code_table)
|| NILP (XVECTOR (Vlatin_extra_code_table)->contents[c])))
break;
found = CATEGORY_MASK_CHARSET;