From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65669 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: [Unicode-2] `read' always returns multibyte symbol Date: Thu, 15 Nov 2007 12:01:04 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1195095698 31130 80.91.229.12 (15 Nov 2007 03:01:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2007 03:01:38 +0000 (UTC) Cc: Kenichi Handa , ding@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 15 04:01:42 2007 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 1IsUz7-0006Qj-9L for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 04:01:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsUyu-00013e-Rt for ged-emacs-devel@m.gmane.org; Wed, 14 Nov 2007 22:01:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IsUyr-00013S-Rk for emacs-devel@gnu.org; Wed, 14 Nov 2007 22:01:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IsUyn-00011T-CS for emacs-devel@gnu.org; Wed, 14 Nov 2007 22:01:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsUyn-00011M-AL for emacs-devel@gnu.org; Wed, 14 Nov 2007 22:01:21 -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 1IsUym-0004Fo-AO for emacs-devel@gnu.org; Wed, 14 Nov 2007 22:01:20 -0500 Original-Received: from [66.225.201.151] (port=51650 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1IsUyd-0008VA-0u; Wed, 14 Nov 2007 21:01:11 -0600 X-Hashcash: 1:20:071115:monnier@iro.umontreal.ca::b0LXi26N/Qh0XiK2:000000000000000000000000000000000000006Pg X-Hashcash: 1:20:071115:handa@ni.aist.go.jp::mFCHgGIQEqTwB+aZ:0000000000000000000000000000000000000000000oyS X-Hashcash: 1:20:071115:ding@gnus.org::IGIi0rYqVIz9iaUS:0000250m X-Hashcash: 1:20:071115:emacs-devel@gnu.org::d5BZ1uUS5MT45yyS:000000000000000000000000000000000000000000Akcm 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:J9nU1Pii2rjKLZUGIvhauLcmEec= Content-Disposition: inline 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:83229 gmane.emacs.gnus.general:65669 Archived-At: >>>>> Stefan Monnier wrote: > Don't know about gnus-work-buffer, but nntp-server-buffer should only > ever contain unibyte data AFAICT, so it would be better to put it in > unibyte mode. I think it's better, too. However, there might be a code that copies data from nntp-server-buffer to a multibyte buffer. I'm not capable to check all the Gnus code. >> (IIUC, copying data from a multibyte buffer to a unibyte buffer >> causes no problem). > I'm not sure I understand: copying data from a multibyte buffer to > a unibyte buffer is exactly the case that can cause problems. I agree that's generally true. But in Gnus' case, data in a multibyte work buffer are the multibyte version of binary data. I don't know proper words to explain it, sorry. In other words, they are the one which `string-to-multibyte' converted binary data to. For example: (with-temp-buffer (set-buffer-multibyte t) (insert (string-to-multibyte (encode-coding-string "=E6=97=A5=E6=9C=AC=E8= =AA=9E" 'utf-8))) (let ((buffer (current-buffer))) (with-temp-buffer (set-buffer-multibyte nil) (insert-buffer-substring buffer) (decode-coding-string (buffer-string) 'utf-8)))) =3D> "=E6=97=A5=E6=9C=AC=E8=AA=9E" I'm not sure it works with any data, though. Regards,