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: help needed with coding systems (unrmail problems) Date: Thu, 13 Jan 2011 21:51:15 -0500 Message-ID: References: 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: dough.gmane.org 1294973511 25005 80.91.229.12 (14 Jan 2011 02:51:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2011 02:51:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: mark.lillibridge@hp.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 14 03:51:45 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 1PdZlE-00064d-Qh for ged-emacs-devel@m.gmane.org; Fri, 14 Jan 2011 03:51:45 +0100 Original-Received: from localhost ([127.0.0.1]:57211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdZl8-0003zD-LN for ged-emacs-devel@m.gmane.org; Thu, 13 Jan 2011 21:51:26 -0500 Original-Received: from [140.186.70.92] (port=54730 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdZl2-0003xa-6N for emacs-devel@gnu.org; Thu, 13 Jan 2011 21:51:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdZkz-0003kz-CO for emacs-devel@gnu.org; Thu, 13 Jan 2011 21:51:18 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:4563 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdZkz-0003kr-7f for emacs-devel@gnu.org; Thu, 13 Jan 2011 21:51:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskFAONIL01FxIbi/2dsb2JhbACWOo4TdLx5hUwEhGiOKg X-IronPort-AV: E=Sophos;i="4.60,321,1291611600"; d="scan'208";a="88026468" Original-Received: from 69-196-134-226.dsl.teksavvy.com (HELO ceviche.home) ([69.196.134.226]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 13 Jan 2011 21:51:16 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 947B9660C9; Thu, 13 Jan 2011 21:51:15 -0500 (EST) In-Reply-To: (Mark Lillibridge's message of "Thu, 13 Jan 2011 15:22:40 -0800") 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:134517 Archived-At: > Ok, I have a Rmail Babyl file whose contents are correctly encoded > via raw-text-unix (V22) -- for those curious, I believe this can be raw-text-unix is an alias for `binary'. I.e. it takes bytes in and returns the same bytes unchanged. Decoding using it should never result in any non-ascii chars: only ascii chars and "eight-bit chars" (i.e. bytes between 128-255). > I have verified that this character is represented on disk as 81 FC > (hex). If I visit that file literally (also), I see \201\374, which is > octal for 81 FC as expected. > When I fire up unrmail on this file, it first reads it in as > "raw-text-unix": I.e. it read it literally. > It then decodes the main part of the file containing the messages: > (unless (and coding-system > (coding-system-p coding-system)) > (setq coding-system > ;; Emacs 21.1 and later writes RMAIL files in emacs-mule, b= ut > ;; earlier versions did that with the current buffer's enco= ding. > ;; So we want to favor detection of emacs-mule (whose normal > ;; priority is quite low), but still allow detection of oth= er > ;; encodings if emacs-mule won't fit. The call to > ;; detect-coding-with-priority below achieves that. > (car (detect-coding-with-priority > from to > '((coding-category-emacs-mule . emacs-mule)))))) > (message "decoding file with %s" coding-system) > (unless (memq coding-system > '(undecided undecided-unix)) > (set-buffer-modified-p t) ; avoid locking when decoding > (let ((buffer-undo-list t)) > (decode-coding-region from to coding-system)) > (setq coding-system last-coding-system-used)) > (message "actual coding system used: %s" coding-system) > I have verified via the inserted message calls above that it is decoding > using raw-text-unix here. Sounds like you have a problem here: it should be using emacs-mule (since \201\374 is the emacs-mule encoding of =FC). Stefan