[BUG]
Stéphane Ducasse
stephane.ducasse at univ-savoie.fr
Sat Jul 2 10:36:12 UTC 2005
hi all
can someone help me here?
I did the following
|stream |
stream := (MultiByteFileStream fileNamed: 'BD4TabsDelimited.txt').
stream converter: MacRomanTextConverter new.
self assert: (stream upTo: Character cr) = ' Achille Talon
Greg Pas de pitié pour Achille talon 13 1976
Dargaud "sur la couverture ""une histoire du journal
tintin""" '
This is ok!
Now I'm trying to use MultiByteBinaryOrTextStream as follow
|stream |
stream := MultiByteBinaryOrTextStream on: self
completeWithTabbingLinesWithAccents encoding: 'mac-roman'.
self assert: (stream upTo: Character cr) = ' '
when I do
stream contents I got '' while there is a collection...
It seems that the stream once instantiated is at the end. (readLimit
is 0 when the instance is created)
How can I say to the stream to be at the start. I tried reset,
resetAtStart without success
when in an inspector I copy the writeLimit to the readLimit then
upTo: works perfectly.
Is it a bug?
I added
MultiByteBinaryOrTextStream>>atStart
readLimit := writeLimit.
position := 0.
and it works but this seems to me quite strange that I cannot open a
MultiByteBinaryOrTextStream
in read and be at the beginning of the stream
Stef
More information about the Squeak-dev
mailing list
|