From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: emacs refuses to save file in the same encoding it was read Date: Fri, 10 Oct 2003 16:08:12 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: Reply-To: clisp-list@lists.sourceforge.net NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1065817024 17078 80.91.224.253 (10 Oct 2003 20:17:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Oct 2003 20:17:04 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Oct 10 22:17:03 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A83h9-0007Yo-00 for ; Fri, 10 Oct 2003 22:17:03 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A83h8-0002mq-00 for ; Fri, 10 Oct 2003 22:17:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A83cL-0001GI-3J for emacs-devel@quimby.gnus.org; Fri, 10 Oct 2003 16:12:05 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A83Z9-0000iv-2W for emacs-devel@gnu.org; Fri, 10 Oct 2003 16:08:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A83Yc-0000ZU-Dr for emacs-devel@gnu.org; Fri, 10 Oct 2003 16:08:45 -0400 Original-Received: from [198.112.236.6] (helo=alphatech.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A83Yb-0000ZF-V5 for emacs-devel@gnu.org; Fri, 10 Oct 2003 16:08:14 -0400 Original-Received: from WINSTEINGOLDLAP (winsteingoldlap-dock.alphatech.com [10.0.19.22]) by alphatech.com (8.11.7+Sun/8.11.6/check_local-4.4) with ESMTP id h9AK8Cd18203 for ; Fri, 10 Oct 2003 16:08:12 -0400 (EDT) X-Spam-Filter: check_local@alphatech.com 4.4(020923:1754) http://digitalanswers.org/ Original-To: emacs-devel@gnu.org X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (windows-nt) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17024 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17024 GNU Emacs 21.3.50.1 (i386-msvc-nt5.0.2195) of 2003-10-08 on WINSTEINGOLDLAP --with-msvc (12.00) I have a file which starts with this line: ;;; -*- coding: utf-8-unix -*- it is opened and displayed by emacs correctly. however, when I try to modify and save it, I get the following question: Selected encoding mule-utf-8-unix disagrees with iso-2022-7bit specified by file contents. Really save (else edit coding cookies and try again)? (y or n) when I answer affirmatively, the file is saved, but a line ;; -*- coding: iso-2022-7bit; -*- is added in front of my cookie. what is going on? My understanding is that since everything can be encoded with utf-8, there is no reason for Emacs to suggest a different encoding. I seem to remember that there are some identical characters - from the unicode POV - which Emacs represents differently. First, I thought this bug has been fixed already. Second, I thought it was irrelevant here anyway: the file is read in utf-8! It appears that buffer-file-coding-system is somehow set to iso-2022-7bit; I sets default value to utf-8. -- Sam Steingold (http://www.podval.org/~sds) running w2k main(a){printf(a,34,a="main(a){printf(a,34,a=%c%s%c,34);}",34);}