From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64269 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.gnus.general Subject: Re: TRAMP copies binary files incorrectly Date: Wed, 24 Jan 2007 17:18:37 +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: sea.gmane.org 1169626750 29304 80.91.229.12 (24 Jan 2007 08:19:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2007 08:19:10 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Chris Moore , ding@gnus.org To: Kenichi Handa Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Wed Jan 24 09:19:06 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 1H9dLV-0001j2-Rl for gebp-emacs-pretest-bug@gmane.org; Wed, 24 Jan 2007 09:19:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9dLV-0004sL-BC for gebp-emacs-pretest-bug@gmane.org; Wed, 24 Jan 2007 03:19:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9dLL-0004q4-2P for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 03:18:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9dLJ-0004mV-LX for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 03:18:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9dLJ-0004mH-Dj for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 03:18:53 -0500 Original-Received: from [216.246.45.90] (helo=orlando.hostforweb.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9dLJ-0002qW-3n for emacs-pretest-bug@gnu.org; Wed, 24 Jan 2007 03:18:53 -0500 Original-Received: from [66.225.201.151] (port=57690 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.63) (envelope-from ) id 1H9dKd-0005ON-S5; Wed, 24 Jan 2007 02:18:12 -0600 X-Hashcash: 1:20:070124:handa@m17n.org::aD3d8b3CGp0+cZe2:0007JRh X-Hashcash: 1:20:070124:christopher.ian.moore@gmail.com::s9Ak5V8HM8YabSyk:0000000000000000000000000000002mYD X-Hashcash: 1:20:070124:emacs-pretest-bug@gnu.org::rezB6M/CbRgGtFph:0000000000000000000000000000000000002UC0 X-Hashcash: 1:20:070124:ding@gnus.org::b3ixJ6vmeWzqaK8T:0000DKYh 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.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:UgAalhSiYruklMyiTcTEUuN2HuQ= 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 - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:16777 gmane.emacs.gnus.general:64269 Archived-At: >>>>> 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'. 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). Thanks in advance. --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---