[squeak-dev] MutliByteFileStream and CrLfFileStream (and windows)

Chris Cunningham cunningham.cb at gmail.com
Wed Aug 13 20:57:50 UTC 2014


Hi.

so, for a while now, I've been annoyed that the newer Squeak's didn't
really handle Windows nicely - at least, not writing to files to handle
outside of Squeak.  Today I finally dug into the code to find out why.

Many moons ago, MultiByteFileStream was created as the replacement fo
rCrLfFileStream, and most references to CrLfFileStream went away.  Which is
even commented in the code(!), as:
It also combined the good old CrLfFileStream.  CrLfFileStream class>>new
now returns an instance of MultiByteFileStream.

However, the conversion wasn't complete.  In particular:
FileDirectory>>newFileNamed: (and related things) just get a new
MutliByteFileStream, which doesn't activate any of the CrLf lineEnding
magic - it assume there is no line ending conversions wanted at all.
In fact, no way to use MutliBytFileStream (except as CrLfFileStream new,
from that obsoleted class) really use it (exceptions being FileList and
BDFFontReader).  This is annoying on a system that doesn't use cr as the
default line endings (are there any left?).

Further, if you do set it up to detect line endings, as far as I can tell,
it never actually does any conversions!

Would anyone mind if I finished putting the CrLfFileStream functionality
into MultiByteFileStream?  and if I did it, would anyone else use it?

-cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140813/d8c14c53/attachment.htm


More information about the Squeak-dev mailing list