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#2354: 23.0.90; Emacs fails to detect utf-8 encoding with language environment Latin-1 Date: Tue, 17 Feb 2009 19:04:42 +0100 Message-ID: References: <87y6w5jqqo.fsf@engster.org> Reply-To: David Engster , 2354@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1234895033 16901 80.91.229.12 (17 Feb 2009 18:23:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 18:23:53 +0000 (UTC) Cc: 2354@emacsbugs.donarmstrong.com To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 17 19:25:09 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 1LZUd0-0003Cn-0T for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Feb 2009 19:25:06 +0100 Original-Received: from localhost ([127.0.0.1]:37715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZUbf-0001Lz-Px for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Feb 2009 13:23:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZUbc-0001Lh-5H for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 13:23:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZUba-0001Kw-IS for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 13:23:39 -0500 Original-Received: from [199.232.76.173] (port=58552 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZUba-0001Ki-81 for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 13:23:38 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41833) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZUbZ-0005k4-9v for bug-gnu-emacs@gnu.org; Tue, 17 Feb 2009 13:23:37 -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 n1HINZoa016194; Tue, 17 Feb 2009 10:23:35 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1HIA4fT012738; Tue, 17 Feb 2009 10:10:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: David Engster Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 17 Feb 2009 18:10:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2354 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2354-submit@emacsbugs.donarmstrong.com id=B2354.123489388910628 (code B ref 2354); Tue, 17 Feb 2009 18:10:04 +0000 Original-Received: (at 2354) by emacsbugs.donarmstrong.com; 17 Feb 2009 18:04:49 +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 n1HI4j5P010622 for <2354@emacsbugs.donarmstrong.com>; Tue, 17 Feb 2009 10:04:47 -0800 Original-Received: from kafka.physik3.gwdg.de ([134.76.92.48] helo=kafka) by m61s02.vlinux.de with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1LZUL9-0005wg-Tc; Tue, 17 Feb 2009 19:06:39 +0100 In-Reply-To: (Juanma Barranquero's message of "Tue, 17 Feb 2009 17:45:59 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 17 Feb 2009 13:23:38 -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:25374 Archived-At: Juanma Barranquero writes: > On Tue, Feb 17, 2009 at 11:35, David Engster wrote: > >> You can reproduce it as follows: >> >> 1. emacs -Q >> 2. M-x set-language-environment RET Latin-1 RET >> 3. In some buffer write: >> >> (ucs-insert "2500") >> >> 4. Eval it, so that the unicode character is inserted into the buffer. >> 5. Save the file and choose utf-8 as encoding. >> 6. Kill the buffer. >> 7. Load the file you just saved. >> >> Result: Emacs displays "=E2\224\200" for the unicode character. > > I cannot reproduce it on Windows with the current trunk. The file's > coding is correctly detected as UTF-8. Thank you for looking into this. I tested this now again on a different machine, but also running GNU/Linux (Ubuntu 8.10), with the same result. FWIW, I think I could track down this issue to the following commit for src/coding.c: revision 1.413 date: 2009-02-09 01:42:37 +0100; author: handa; state: Exp; lines: +1 -1= ; commitid: WAhpeD8cqX926HBt; (detect_coding_charset): Fix previous change. With revision 1.412 of coding.c, the error disappears for me. -David