From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.bugs Subject: bug#2497: 23.0.91; Fails to read UTF-8 on Win2k Date: Sat, 28 Feb 2009 11:14:16 +0100 Message-ID: <87tz6e3m2v.fsf@engster.org> References: <877i3c55tg.fsf@tum.de> <87ljrromgg.fsf@tum.de> <87zlg7t1pc.fsf@tum.de> Reply-To: David Engster , 2497@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1235816641 19774 80.91.229.12 (28 Feb 2009 10:24:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2009 10:24:01 +0000 (UTC) Cc: 2497@emacsbugs.donarmstrong.com To: uwe.siart@tum.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 28 11:25:17 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LdMNf-0003So-CU for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Feb 2009 11:25:16 +0100 Original-Received: from localhost ([127.0.0.1]:41806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdMMK-0006Bj-0W for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Feb 2009 05:23:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdMMD-00069x-08 for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2009 05:23:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdMM9-00067D-5J for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2009 05:23:43 -0500 Original-Received: from [199.232.76.173] (port=52535 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdMM8-000671-Rv for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2009 05:23:40 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53290) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LdMM8-0007MJ-Cy for bug-gnu-emacs@gnu.org; Sat, 28 Feb 2009 05:23:40 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1SANc3C032456; Sat, 28 Feb 2009 02:23:38 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1SAK7gN031077; Sat, 28 Feb 2009 02:20:07 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: David Engster Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 28 Feb 2009 10:20:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2497 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2497-submit@emacsbugs.donarmstrong.com id=B2497.123581606828911 (code B ref 2497); Sat, 28 Feb 2009 10:20:07 +0000 Original-Received: (at 2497) by emacsbugs.donarmstrong.com; 28 Feb 2009 10:14:28 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from m61s02.vlinux.de (m61s02.vlinux.de [83.151.21.164]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1SAENKA028887 for <2497@emacsbugs.donarmstrong.com>; Sat, 28 Feb 2009 02:14:25 -0800 Original-Received: from dslc-082-082-164-201.pools.arcor-ip.net ([82.82.164.201] helo=void) by m61s02.vlinux.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1LdMFU-00060w-VZ; Sat, 28 Feb 2009 11:16:49 +0100 In-Reply-To: <87zlg7t1pc.fsf@tum.de> (Uwe Siart's message of "Sat, 28 Feb 2009 09:17:35 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.91 (gnu/linux) Mail-Copies-To: never X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 28 Feb 2009 05:23:43 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25832 Archived-At: Uwe Siart writes: > Stefan Monnier writes: > >> The guessing shouldn't give priority to buffer-file-coding-system. >> Instead we have the set-coding-system-priority instead. And IIUC utf-8 >> should always have a pretty high priority since false positives are >> fairly rare. So this still looks like a real bug. > > Here I would like to note that I never had false positives in the past > (before 23.0.91) but I do have false positives now. Therefore I'm > inclined to call it a bug. I second this - this has worked for years without problems, and suddenly it fails to detect UTF-8 with a Latin-1 environment. I once again confirmed that this behaviour can be tracked down to this change in detect_coding_charset in coding.c (revision 1.413): --- coding.c 7 Feb 2009 10:49:39 -0000 1.412 +++ coding.c 9 Feb 2009 00:42:37 -0000 1.413 @@ -5101,7 +5101,7 @@ 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-")) + && strcmp ((char *) SDATA (SYMBOL_NAME (name)), "iso-8859-") == 0) check_latin_extra = 1; if (! NILP (CODING_ATTR_ASCII_COMPAT (attrs))) src += head_ascii; I'm inclined to say that this change is wrong, since strcmp will only return 0 if two strings are exactly equal. In this case though, the string "iso-8859-" is compared to "iso-8859-1" (in my case), so it returns 1 and therefore check_latin_extra is not set. -David