From: Eli Zaretskii Date: Sat, 28 Feb 2009 12:05:36 +0000 (+0000) Subject: (detect_coding_charset): Fix change from 2008-10-21. X-Git-Tag: emacs-pretest-23.0.92~412 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a4aee864ad4655ad2cfa691eae5f3797e2f38bcd;p=emacs.git (detect_coding_charset): Fix change from 2008-10-21. Also, check iso-latin-*, not only iso-8859-*. --- diff --git a/src/ChangeLog b/src/ChangeLog index 43a72dae60b..41c25d27ef0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-02-28 Eli Zaretskii + + * coding.c (detect_coding_charset): Fix change from 2008-10-21. + Also, check iso-latin-*, not only iso-8859-*. + 2009-02-27 Glenn Morris * callint.c (Finteractive): Doc fix. diff --git a/src/coding.c b/src/coding.c index 7438fc0d337..020a1401575 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5103,7 +5103,10 @@ detect_coding_charset (coding, detect_info) 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;