[Q][RFI] Where ends a line of ASCII text ?

Lic. Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Fri Mar 18 08:53:11 UTC 2005


On [DATE], "[NAME]" <[ADDRESS]> wrote:

>> SocketStream is a bad example , it's not my intention said this particular
>> have any wrong.
> 
>   If you want to deal with external files, you use FileStream, right?
> In 3.8 gamma Squeak, the FileStream (sub-)instance you create via:
> 
>   FileStream fileNamed: 'foo.txt'.
> 
> creates the stream that is capable to absorb the end-of-line
> difference.
> 
>   In 3.8 gamma, you can say:
> 
> f := FileStream fileNamed: 'foo.txt'.
> f wantsLineEndConversion: true.
>         f converter: Latin1TextConverter new.
> lines := OrderedCollection new.
> [(line := f nextLine) ~= nil] whileTrue: [lines add: line].
> f close.
> 
> no matter what line-end-convention foo.txt uses.   (You may want to use:
> 
>         f converter: UTF8TextConverter new.
> ).
> 
>   FileStream is a few exception where Squeak needs to deal with the
> outside world.  And it is handled reasonably well.
> 
> -- Yoshiki
Very, very thanks
Now I see my mistake.

Edgar






More information about the Squeak-dev mailing list