changeset 102320:d8f068bac680

(detect_coding_charset): Fix change from 2008-10-21. Also, check iso-latin-*, not only iso-8859-*.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 28 Feb 2009 12:04:30 +0000
parents 58c8067194da
children cad10434c243
files src/coding.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Sat Feb 28 04:44:50 2009 +0000
+++ b/src/coding.c	Sat Feb 28 12:04:30 2009 +0000
@@ -5103,7 +5103,10 @@
   valids = AREF (attrs, coding_attr_charset_valids);
   name = CODING_ID_NAME (coding->id);
   if (VECTORP (Vlatin_extra_code_table)
-      && strcmp ((char *) SDATA (SYMBOL_NAME (name)), "iso-8859-") == 0)
+      && (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;