From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [angeli@iwi.uni-sb.de: Coding problem with Euro sign] Date: Sat, 17 Dec 2005 09:36:21 +0200 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1134805134 1981 80.91.229.2 (17 Dec 2005 07:38:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2005 07:38:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 17 08:38:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EnWdZ-0000el-Ly for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2005 08:37:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnWeI-0001eY-Ny for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2005 02:38:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EnWcz-0001e5-4w for emacs-devel@gnu.org; Sat, 17 Dec 2005 02:37:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EnWcx-0001dl-L9 for emacs-devel@gnu.org; Sat, 17 Dec 2005 02:37:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnWcx-0001dd-9L for emacs-devel@gnu.org; Sat, 17 Dec 2005 02:37:11 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EnWfV-0001Lb-Mm for emacs-devel@gnu.org; Sat, 17 Dec 2005 02:39:49 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-73-173.inter.net.il [80.230.73.173]) by romy.inter.net.il (MOS 3.7.2-GA) with ESMTP id DER92402 (AUTH halo1); Sat, 17 Dec 2005 09:36:19 +0200 (IST) Original-To: Kevin Rodgers In-reply-to: (message from Kevin Rodgers on Fri, 16 Dec 2005 15:58:22 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47929 Archived-At: > From: Kevin Rodgers > Date: Fri, 16 Dec 2005 15:58:22 -0700 > > Ralf Angeli wrote: > > Currently I am on GNU/Linux. Anyway, with the development version of > > Emacs I did not have the problems with cp1252 you described when > > loading the file. But when trying to write the file I got this > > warning: > > > > ,---- > > | Warning (:warning): Invalid coding system `cp1252' is specified > > | for the current buffer/file by the variable `auto-coding-regexp-alist'. > > | It is highly recommended to fix it before writing to a file. > > `---- > > > > I didn't do `M-x codepage-setup RET' before trying all of this. > > Interestingly loading and writing the file worked fine if I used > > windows-1252 instead of cp1252. > > Well, there you go. Emacs 22.0 supports windows-1252, and Emacs 21.4 > only supports cp850. As I wrote elsewhere in this thread, Emacs 22 has a new implementation of the code page support (code-pages.el), which doesn't need codepage-setup, and also supports windows-1252 and other similar encoding names. Emacs 21 didn't have that; thus the differences in behavior described above. > > After the encoding was identified to be a Windows > > codepage, the exact codepage could be chosen based on the language > > environment. But this suggestion is just random guesswork from my > > side because I know close to nothing about what processes are involved > > in identifying an encoding. > > Me neither, your idea sounds reasonable to me. I may be missing something, but where is the problem? Emacs already uses the Windows language environment to select the default code page. (I didn't track this long thread, so perhaps I don't understand the issue you were discussing here.) Are you talking about the default code page, or something else? If that's not the default code page, then the language environment is not a good guide to decide the encoding. > I don't understand why auto-coding-regexp-alist has such a high > priority (over the coding: tag). Because we want RMAIL Babyl files to be recognized and read with no decoding, even if something or someone tagged it with a `coding' tag. In other words, auto-coding-regexp-alist exists _precisely_ so you could define something that depends on the file's contents, but takes precedence over the `coding' tags.