Subject: Re: CRLF fun stuff again...
From: Tom Watson (tsw@johana.com)
Date: Sat Feb 10 2001 - 16:05:02 EST
On Sat, 10 Feb 2001 11:05:01 -0500 (EST), netatalk-admins@umich.edu wrote:
<<<deletia>>>
>
> >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.
> >
<<<deletia, including some code>>>
The "secret" to all of this is to swap BOTH characters at the same
time. Then the process is reversable. Doing ONLY one is a recipe
for disaster. You can easily see how this works by taking a
simple sentence and doing:
$ tr "ab" "ba" <source >dest
If you do it back, it comes out the same way.
Look at how the program "rot13" works for BOTH encoding and decoding.
Of course, doing this in the AFP server is a little crazy, but that
is another matter. If it IS done, then someone should save that fact
in the "finder comments" or some such so that is is known to all.
That is another topic...
-- Tom Watson Generic short signature tsw@johana.com (I'm at home now)
This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:32 EDT