changeset 102327:a1f0d8fadbb1

(detect_coding_charset): Fix last change for non-latin charsets.
author Jason Rumney <jasonr@gnu.org>
date Sat, 28 Feb 2009 13:52:03 +0000
parents 376ab174a95d
children 51e686047b3b
files src/coding.c
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Sat Feb 28 13:43:23 2009 +0000
+++ b/src/coding.c	Sat Feb 28 13:52:03 2009 +0000
@@ -5102,12 +5102,12 @@
   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 @@
       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;