From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: starback@stp.lingfil.uu.se (Per =?UTF-8?Q?Starb=C3=A4ck?=) Newsgroups: gmane.emacs.bugs Subject: bug#11694: 24.1; in-is13194-devanagari with \200 Date: Wed, 13 Jun 2012 16:28:20 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339597774 17773 80.91.229.3 (13 Jun 2012 14:29:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2012 14:29:34 +0000 (UTC) To: 11694@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 13 16:29:32 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SeoZf-0003tg-If for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jun 2012 16:29:31 +0200 Original-Received: from localhost ([::1]:33102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeoZf-0001rh-GJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jun 2012 10:29:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeoZX-0001rQ-Jf for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:29:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeoZO-00089w-6J for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:29:23 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeoZO-00089r-2Y for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:29:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Seoc5-0000jX-LX for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: starback@stp.lingfil.uu.se (Per =?UTF-8?Q?Starb=C3=A4ck?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jun 2012 14:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11694 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13395979052796 (code B ref -1); Wed, 13 Jun 2012 14:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jun 2012 14:31:45 +0000 Original-Received: from localhost ([127.0.0.1]:40972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Seobo-0000j2-IO for submit@debbugs.gnu.org; Wed, 13 Jun 2012 10:31:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54626) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Seobm-0000iu-8u for submit@debbugs.gnu.org; Wed, 13 Jun 2012 10:31:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeoYy-000889-2R for submit@debbugs.gnu.org; Wed, 13 Jun 2012 10:28:53 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:42677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeoYx-000882-VJ for submit@debbugs.gnu.org; Wed, 13 Jun 2012 10:28:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeoYt-0001rJ-40 for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:28:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeoYm-000879-3f for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:28:42 -0400 Original-Received: from numerus.lingfil.uu.se ([130.238.78.148]:41709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeoYl-00086m-PQ for bug-gnu-emacs@gnu.org; Wed, 13 Jun 2012 10:28:36 -0400 Original-Received: from numerus.lingfil.uu.se (numerus.lingfil.uu.se [130.238.78.148]) by numerus.lingfil.uu.se (8.14.4/8.14.4) with ESMTP id q5DESK2a002662; Wed, 13 Jun 2012 16:28:23 +0200 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60934 Archived-At: In GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9) value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix $ echo -e 'Sm\xf6rg\xe5sbord' >test1.txt When opened by Emacs that file is detected correctly as being Latin-1. $ echo -e 'Sm\xf6rg\xe5sbord \x805' >test2.txt Here I add a price of 5 Euro for the Smorgasbord, written with Microsoft's windows-1252 (which is very similar to latin-1). With Emacs 23 this test2.txt is opened as raw-text-unix which is OK I guess. (Detecting windows-1252 correctly isn't that easy.) But now, with Emacs 24, it is opened as in-is13194-devanagari-unix which surprises me. I think this is a bug. The problem is that \xe5 is shown as "\200" then anyway. Why guess a coding which doesn't make sense of all the characters? And if we really want to guess something even if it doesn't make sense of that character, why prefer this to Latin-1 which makes sense of the same part of the input and which was preferrable if the "strange" part didn't exist? I don't know where this change comes from. "C-h C" shows the same "Priority order for recognizing coding systems when reading files" as I had in 23.4, starting Priority order for recognizing coding systems when reading files: 1. utf-8 (alias: mule-utf-8) 2. iso-2022-7bit 3. iso-latin-1 (alias: iso-8859-1 latin-1) 4. iso-2022-7bit-lock (alias: iso-2022-int-1) 5. iso-2022-8bit-ss2 6. emacs-mule 7. raw-text 8. iso-2022-jp (alias: junet) 9. in-is13194-devanagari (alias: devanagari) windows-1252 isn't there at all, so of course I can't detect that. (Maybe it ought to be there somewhere, but that's another issue in that case.) After (set-coding-system-priority 'windows-1252) (set-coding-system-priority 'in-is13194-devanagari) so that windows-1252 is recognized, but in-is13194-devanagari is preferred, test2.txt still detects as in-is13194-devanagari, even though there now is is a possiblity that makes sense of all characters.