CR LF Problem in Windows XP
Ron Teitelbaum
Ron at USMedRec.com
Tue Apr 4 20:30:47 UTC 2006
Thanks Chris,
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.
I'm surprised at how few file writing and reading methods there are. I
tried to add some collection methods earlier and was told there were already
too many methods on collection. In VW I had outputToFilename: on string and
on collection (created as string with a cr between each item). Also
outputToFilenameUsingBlock: , not to mention toClipboard. I would think it
would be nice to add those methods. How do people feel about adding those
methods before I post a patch that only spawns arguments?
Thanks,
Ron Teitelbaum
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
> bounces at lists.squeakfoundation.org] On Behalf Of Chris Muller
> Sent: Tuesday, April 04, 2006 4:02 PM
> To: Ron at USMedRec.com; The general-purpose Squeak developers list
> Subject: Re: CR LF Problem in Windows XP
>
> 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
|