Subject: Re: CR/LF question

From: Duncan Sinclair <[email-masked]>
Date: Fri, 22 Sep 2000 14:01:24 +0100

Wes writes:
>This is a frequently asked question...

Indeed.

>> From:    Peter DiCamillo <[email-masked]>
>> To:      [email-masked]

>> I'm not proposing any solution that involves guessing.  The problem 
>> we're encountering is that the Finder and some other programs, such 
>> as StuffIt, create a file with some other type, write data to the 
>> file, then change the type to TEXT when done.  That results in the 
>> data not being translated when written, but then being translated 
>> when read (since the type has become TEXT).  The solution I'm 
>> proposing is to never translate such files.  The code would keep 
>> track of whether the original type of the file at it's creation was 
>> TEXT, and subsequently use that information instead of the current 
>> type when deciding whether or not to translate.

>To be a more perfect mac-only file repository, CR/LF translation should
>be disabled.  If you want to successfully share files between macs and
>unix machines, CR/LF has certain benefits.  It is some what less
>necessary these days, at least for users familiar with editors like
>BBEdit.  Unsophisticated users may still benefit from CR/LF
>translation, tho the possibility of confusion may make it undesirable.

In fact, this very sophisticed user wants to have CR/LF translation
so that my unsophisticed users can read the files I write on my Sun,
and so that I can read on my Sun, files created on a Mac.

The only way to do this right is to watch for the file type being
switched to "TEXT" and do the conversion in-place.  If it is switched
to something other than "TEXT", you need to un-convert, again in-place.

There are other complications with text files created on the server.

This is my #1 wish for version 1.5, or above.

Cheers,

Duncan Sinclair.

PS> Someone wrote to me asking what filetype the finder uses when
copying files, but I've been away on holiday and I haven't had a
chance to catch up with all my mail.  The answer is I can't remember,
but using the method outlined above, you shouldn't need to know.