CR LF Problem in Windows XP

Yoshiki Ohshima yoshiki at squeakland.org
Tue Apr 4 20:57:23 UTC 2006


  Ron,

> I saw the CRLF stream but figured there was some magic way to get the file
> to use it.  I saw ascii and all those flags for #crlf and wantsEndConversion
> or something like that but nothing worked.  

  Didn't a code snippet like following work?

f _ FileStream newFileNamed: 'foo.txt'.
f wantsLineEndConversion: true.
f nextPutAll: 'abc\def' withCRs
f close.

To specify it explicitly:

f _ FileStream newFileNamed: 'foo.txt'.
f wantsLineEndConversion: true.
f lineEndConvention: #crlf.
f nextPutAll: 'abc\def' withCRs.
f close.

should work, too.

-- Yoshiki



More information about the Squeak-dev mailing list