[Top][All Lists]

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

Re: TRAMP copies binary files incorrectly

From: Kenichi Handa
Subject: Re: TRAMP copies binary files incorrectly
Date: Thu, 11 Jan 2007 11:21:40 +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)

In article <address@hidden>, Chris <address@hidden> writes:

> 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?

The byte sequence 0x81 0xCE looks like Emacs' internal
character representation for ISO-8859-1 0xCE character.  So,
it seems that Emacs is doing character-DECODING conversion
on reading that 1-byte file, and then it writes without
encoding it back.

Kenichi Handa

reply via email to

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