From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66404 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Why multibyte for original-article buffer Date: Fri, 29 Feb 2008 14:44:14 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204263884 30566 80.91.229.12 (29 Feb 2008 05:44:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 05:44:44 +0000 (UTC) Cc: bugs@gnus.org, ding@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 29 06:45:10 2008 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.50) id 1JUy3Q-0005p3-QK for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 06:45:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUy2u-0002zv-Es for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 00:44:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUy2o-0002z3-7r for emacs-devel@gnu.org; Fri, 29 Feb 2008 00:44:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUy2m-0002xo-L2 for emacs-devel@gnu.org; Fri, 29 Feb 2008 00:44:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUy2m-0002xj-E6 for emacs-devel@gnu.org; Fri, 29 Feb 2008 00:44:28 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JUy2l-0007YO-DL for emacs-devel@gnu.org; Fri, 29 Feb 2008 00:44:28 -0500 Original-Received: from [66.225.201.151] (port=35573 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1JUy2f-0000Mp-T9; Thu, 28 Feb 2008 23:44:22 -0600 X-Hashcash: 1:20:080229:monnier@iro.umontreal.ca::VRPgbzYaIk4spdKF:00000000000000000000000000000000000001DyF X-Hashcash: 1:20:080229:bugs@gnus.org::Yrw8p2lHw8HZ02dw:00004Ajt X-Hashcash: 1:20:080229:ding@gnus.org::UstgOx6TeQoa9t//:000008Ot X-Hashcash: 1:20:080229:emacs-devel@gnu.org::diI8KWwjo21qnTkk:0000000000000000000000000000000000000000002cBR X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:lqNtzC8hRp5ogb4wdT5Y1fNfjJM= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: by monty-python.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:90832 gmane.emacs.gnus.general:66404 Archived-At: >>>>> Stefan Monnier wrote: > Indeed, I see that. The patch below will fix it. It works. > - (insert-buffer-substring gnus-original-article-buffer) > + ;; `insert-buffer-substring' would incorrectly use the > + ;; equivalent of string-make-multibyte which amounts to decoding > + ;; with locale-coding-system, causing failure of > + ;; subsequent decoding. > + (insert (mm-string-to-multibyte > + (with-current-buffer gnus-original-article-buffer > + (buffer-substring (point-min) (point-max))))) This might be the most suitable occasion to decode raw data into the human readable ones rather than only converting the multibyteness. It suggests there will also be such items lying about here and there. Though I think it should be done for the second step. > Yes, the Gnus code is full of such things. I suggest it's time to take > a step back and think about how things *should* work. Then change the > parts for which we know how they should work. This will introduce bugs, > but then we'll know that the bugs are elsewhere and that fixing them > will get us closer to a good solution. Great. I agree with installing those two changes as the first step, though it might force non-ASCII people to live hard with No Gnus for a while, I will one by one fix or at least report things caused by it. Regards,