emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TRAMP copies binary files incorrectly


From: Chris
Subject: TRAMP copies binary files incorrectly
Date: Wed, 10 Jan 2007 21:04:19 +0100

I have a 1 byte file on a remote server.  If I use 'scp' to copy the
file to my local machine, it copies correctly, but if I use:
  $ emacs -Q
  (copy-file "/ssh:address@hidden:~/file" "/tmp/file") C-j
to copy it, then the resulting local file is 2 bytes long.

I used hexl-mode to compare the two files:

  1 byte correct version:
  00000000: ce                                       .

  2 byte broken version:
  00000000: 81ce                                     ..

Could it be that Emacs is doing some kind of character-encoding
conversion?  I don't want that to happen when all I'm doing is trying
to copy a binary file.

I originally noticed this problem when trying to copy a .jpg file from
the remote machine.  It grew from 92,349 bytes on the remote machine
to 118,223 bytes locally, but given the recent issues with automatic
image detection, I though it best to find a smaller test case.

I tried the same thing copying the file from
/ssh:address@hidden:/tmp/file1 to /tmp/file2 but that didn't exhibit
the bug.  Also, copying from the local machine to the remote machine
works OK.


In GNU Emacs 22.0.92.4 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-01-10 on trpaslik
X server distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--with-gtk' '--prefix' '/usr/local' '--with-xpm' 
'--with-jpeg' '--with-png' '--with-gif''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  show-paren-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]