From c2f5b60af59697cfad9307da0f29f2942d9f65fa Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 27 Nov 2012 15:55:25 +0100 Subject: [PATCH] * net/tramp-sh.el (tramp-perl-encode): Use "read STDIN" instead of "". This is binary safe. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp-sh.el | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79028d68f73..618b407fbea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-11-27 Michael Albinus + + * net/tramp-sh.el (tramp-perl-encode): Use "read STDIN" instead of + "". This is binary safe. + 2012-11-27 Stefan Monnier * textmodes/table.el (table-insert): Don't use `symbol-name' on diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 07da0b3dc16..340b7ad353d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -813,14 +813,11 @@ my %%trans = do { map {(substr(unpack(q(B8), chr $i++), 2, 6), $_)} split //, q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/); }; - -binmode(\\*STDIN); +my $data; # We read in chunks of 54 bytes, to generate output lines # of 72 chars (plus end of line) -$/ = \\54; - -while (my $data = ) { +while (read STDIN, $data, 54) { my $pad = q(); # Only for the last chunk, and only if did not fill the last three-byte packet -- 2.39.5