Subject: Re: CRLF fun stuff again...
From: Paul Schinder (schinder@leprss.gsfc.nasa.gov)
Date: Sat Feb 10 2001 - 09:45:57 EST
At 11:11 AM +0000 2/10/01, Duncan Sinclair wrote:
I missed this before.
>
>Here's a test with a binary jpeg file....
>
> (Using GNU tr - Sun's "tr" doesn't cope with binary files - if you
> repeat this test make sure you use one that does.)
>
>quartz:~% sum duncan.jpg
>32290 17 duncan.jpg
>
>Original file's checksum is 32290
>
>quartz:~% tr '\r\n' '\n\r' < duncan.jpg > foo.jpg
>quartz:~% sum foo.jpg
>13378 17 foo.jpg
>
>Transform once, checksum is 13378
>
>quartz:~% tr '\r\n' '\n\r' < foo.jpg > bar.jpg
>quartz:~% sum bar.jpg
>32290 17 bar.jpg
>
>Transform a second time, checksum is back to 32290
>
>Convinced yet???
The transformations you're using aren't the ones that netatalk does
(or at least netatalk did in the past before I turned it off). These
are reversible. netatalk does
tr '\r' '\n' to Unix and tr '\n' '\r' to Mac OS.
That's why people are warning about data corruption.
Maybe netatalk should do what you're doing here. Personally I'd
still leave it off.
>Cheers,
>
>
>Duncan.
-- -- Paul J. Schinder NASA Goddard Space Flight Center Code 693 schinder@leprss.gsfc.nasa.gov
This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:32 EDT