From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64270 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.gnus.general Subject: Re: TRAMP copies binary files incorrectly Date: Wed, 24 Jan 2007 20:08:26 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1169636934 5395 80.91.229.12 (24 Jan 2007 11:08:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2007 11:08:54 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, christopher.ian.moore@gmail.com, ding@gnus.org To: Katsumi Yamaoka Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Wed Jan 24 12:08:51 2007 Return-path: Envelope-to: gebp-emacs-pretest-bug@gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H9fzm-0005kG-9s for gebp-emacs-pretest-bug@gmane.org; Wed, 24 Jan 2007 12:08:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9fzl-00040y-Hn for gebp-emacs-pretest-bug@gmane.org; Wed, 24 Jan 2007 06:08:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9fzY-000401-G7 for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 06:08:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9fzX-0003zW-8Z for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 06:08:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9fzX-0003zT-4x for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 06:08:35 -0500 Original-Received: from [150.29.246.133] (helo=mx1.aist.go.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H9fzV-00044l-Eu for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 06:08:34 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id l0OB8Spg019263; Wed, 24 Jan 2007 20:08:28 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id l0OB8Rp1013382; Wed, 24 Jan 2007 20:08:28 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id l0OB8QiX006409; Wed, 24 Jan 2007 20:08:26 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.63) (envelope-from ) id 1H9fzO-00073J-8M; Wed, 24 Jan 2007 20:08:26 +0900 In-reply-to: (message from Katsumi Yamaoka on Wed, 24 Jan 2007 17:18:37 +0900) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.92 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for CVS Emacs." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.pretest.bugs:16780 gmane.emacs.gnus.general:64270 Archived-At: In article , Katsumi Yamaoka writes: >>>>>> In Kenichi Handa wrote: > > In article , Chris Moore writes: >>> Stefan Monnier writes: >>>>> Which function is it? >>>> >>>> I believe the function "at fault" is uudecode-decode-region >>> Yes, it's uudecode-decode-region. > > Ok, I've just installed a fix to make it work on a multibyte > > buffer. > I'm sorry for the late response but I noticed that uudecode.el > bundled with Gnus now doesn't work with Emacs 21 and XEmacs > because of `string-to-multibyte'. Ah! :-( > Since Gnus still supports > those versions of Emacsen, we have the emulating function for it > in mm-util.el as follows: > --8<---------------cut here---------------start------------->8--- > (defalias 'mm-string-to-multibyte > (cond > ((featurep 'xemacs) > 'identity) > ((fboundp 'string-to-multibyte) > 'string-to-multibyte) > (t > (lambda (string) > "Return a multibyte string with the same individual chars as string." > (mapconcat > (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) > string ""))))) > --8<---------------cut here---------------end--------------->8--- > Is it possible to add a similar one to uudecode.el? I've tested > the attached patch with Gnus v5.10.8 (aka v5.11). Yes. Please install your change. --- Kenichi Handa handa@m17n.org > --8<---------------cut here---------------start------------->8--- > *** uudecode.el~ Sun Jan 21 21:53:53 2007 > --- uudecode.el Wed Jan 24 08:15:57 2007 > *************** > *** 128,133 **** > --- 128,147 ---- > (message "Can not uudecode"))) > (ignore-errors (or file-name (delete-file tempfile)))))) > + (eval-and-compile > + (defalias 'uudecode-string-to-multibyte > + (cond > + ((featurep 'xemacs) > + 'identity) > + ((fboundp 'string-to-multibyte) > + 'string-to-multibyte) > + (t > + (lambda (string) > + "Return a multibyte string with the same individual chars as string." > + (mapconcat > + (lambda (ch) (string-as-multibyte (char-to-string ch))) > + string "")))))) > + > ;;;###autoload > (defun uudecode-decode-region-internal (start end &optional file-name) > "Uudecode region between START and END without using an external program. > *************** > *** 206,212 **** > (or (markerp end) (setq end (set-marker (make-marker) end))) > (goto-char start) > (if enable-multibyte-characters > ! (mapc #'(lambda (x) (insert (string-to-multibyte x))) > (nreverse result)) > (insert (apply 'concat (nreverse result)))) > (delete-region (point) end)))))) > --- 220,226 ---- > (or (markerp end) (setq end (set-marker (make-marker) end))) > (goto-char start) > (if enable-multibyte-characters > ! (mapc #'(lambda (x) (insert (uudecode-string-to-multibyte x))) > (nreverse result)) > (insert (apply 'concat (nreverse result)))) > (delete-region (point) end)))))) > --8<---------------cut here---------------end--------------->8---