<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 16 Feb 2007, at 1:06, Keith Hodges wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>I don't think that it is as simple as that, have a look at CrLfFileStream <BR>new. In 3.9 this invokes MultiByteFileStream instead. Perhaps the <BR>problem lies there instead.<BR></DIV></DIV></BLOCKQUOTE><BR></DIV><DIV>I'm by no means an expert on MultiByteFileStreams, but I don't think that this makes any difference to the problem that I'm highlighting.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>MultiByteFileStream has its own version of detectLineEndConvention, but it's clearly been copied from CrLfFileStream (and then some saves and restores of the converter have been added, in all (?) of the right places).  Consequently the role played by LineEndDefault is the same, and the fact that OSX systems get this set wrong on every startup has the same impact.   The fix that I posed should not adversely affect MultiByteFileStreams.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Related but tangential:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I believe that both of these detectLineEndConvention methods should be using  ensure: to do the resetting of the stream state, and then they could be refactored into one. I also agree that TextFile makes more sense than CrLfFileStream.  The latter is not part of the standard, and could be deprecated, and implemented as a TextFile.  Allowing a CrLfFileStream to be a binary stream seems bogus, but maybe there is a reason.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Andrew P. Black</DIV><DIV>Department of Computer Science</DIV><DIV>Portland State University</DIV><DIV>+1 503 725 2411</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>