From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: url-retrieve-synchronously and coding Date: Mon, 24 Jan 2011 11:44:21 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1295888522 1116 80.91.229.12 (24 Jan 2011 17:02:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 Jan 2011 17:02:02 +0000 (UTC) Cc: Emacs-Devel devel To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 24 18:01:55 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PhPne-0008Eg-6f for ged-emacs-devel@m.gmane.org; Mon, 24 Jan 2011 18:01:54 +0100 Original-Received: from localhost ([127.0.0.1]:36658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhPna-0000SE-HX for ged-emacs-devel@m.gmane.org; Mon, 24 Jan 2011 12:01:51 -0500 Original-Received: from [140.186.70.92] (port=35512 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhPWz-00087R-1D for emacs-devel@gnu.org; Mon, 24 Jan 2011 11:44:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhPWx-00042N-Sy for emacs-devel@gnu.org; Mon, 24 Jan 2011 11:44:40 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:10802 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhPWx-00041x-PC for emacs-devel@gnu.org; Mon, 24 Jan 2011 11:44:39 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAKc6PU1MCo4O/2dsb2JhbACkZ3S8FIVQBIRwjjo X-IronPort-AV: E=Sophos;i="4.60,370,1291611600"; d="scan'208";a="89062589" Original-Received: from 76-10-142-14.dsl.teksavvy.com (HELO pastel.home) ([76.10.142.14]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 24 Jan 2011 11:44:32 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 173B358C4E; Mon, 24 Jan 2011 11:44:21 -0500 (EST) In-Reply-To: (Lennart Borgman's message of "Mon, 24 Jan 2011 13:21:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:134896 Archived-At: > Unfortunately url-insert-file-contents does not decode the file as utf-8. Hmm... the encoding-info is part of the content, so it should be linked to the associated major mode, or something like that. More specifically, I'd expect this to be handled just like the coding-cookie. So at least if you use url-handler-mode and use `find-file-noselect', the encoding should be detected correctly. At which level exactly should this be handled, I'm not completely sure. But I do think that if it works for XML it should also work for other contents which use other ways to specify the encoding (e.g. coding-cookie, or \usepackage[utf8]{inputenc}, or ...). Stefan