CrLfFileStream as default?

Dwight Hughes dwighth at ipa.net
Fri Sep 25 00:11:35 UTC 1998


I would also like to see it handle pathological files -- I seem to run
into a number of source files that have (for example) LF in one part, CR
in another, CRLF in another, and, just for fun, mutants like LFCRLF,
CRLFLF, CRLFCR, and CRCRLF sprinkled here and there. Perhaps
CrLfFileStream should simply chomp all of the above combinations into a
single CR on a read (which seems to be the "right thing" in most cases
I've seen), and only bother with line end conventions when filing out.

I guess I'm wondering if this would be useful to others or if I'm just
lucky.

-- Dwight 

Lex Spoon wrote:
> 
> If a file has a CRLF pair in it, and CrLfFileStream converts that to a CR, then the idea of "position" gets messed up.  It looks like 1 character, but "file position" will act like 2 characters have gone by.  For CrLfFileStream to go the final mile, it should probably have some code to make positions truly transparent to the user.
> 
> Other than that, CrLfFileStream seems very nice.  I've been using it as the default for several months now and found it nothing but convenient.
> 
> Lex
> 
> "Pennell" <pennell at tiac.net> wrote:
> > Dan - thanks for adding this in 2.2.  Is there any reason not to make this
> > the default?
> > If you don't change the default for 2.2, can you add it as a preference?
> >
> > - david





More information about the Squeak-dev mailing list