CR LF Problem in Windows XP

Chris Muller afunkyobject at yahoo.com
Tue Apr 4 20:02:17 UTC 2006


Hi Ron, I think CRLFFileStream can detect the underlying platform and
write CRLF's appropriately..

dir := FileDirectory default.
fileStream := CrLfFileStream fileNamed: (dir fullNameFor: 'test.txt').
[ fileStream nextPutAll: 'a\b' withCRs.
fileStream flush; close ] ensure: [ fileStream close ]

 - Chris

--- Ron Teitelbaum <Ron at USMedRec.com> wrote:

> All,
> 
>  
> 
> On WinXP
> 
> Image: Squeak 3.8-6665
> 
>  
> 
> dir := FileDirectory default.
> 
> (fileStream := dir fileNamed: 'test.txt') ascii.
> 
> fileStream nextPutAll: 'a\b' withCRs.
> 
> fileStream flush; close.
> 
>  
> 
> I get in bytes in hex  61  OD  62.  I need   61  OA OD  62.
> 
>  
> 
> I wanted to make sure that this is a bug and not just me doing
> something
> wrong.
> 
>  
> 
> Is there a proper way to get this to work?
> 
>  
> 
> Thanks,
> 
>  
> 
> Ron Teitelbaum
> 
> Ron at USMedRec.com
> 
> > 
> 




More information about the Squeak-dev mailing list