[Glass] Problems managing files from Pharo and GemStone
Mariano Martinez Peck
marianopeck at gmail.com
Tue Apr 15 08:27:21 PDT 2014
Hi guys. I don't understand why I have just faced this problem now and not
before...but... I am writing a text file (sixx serialization) in GemStone
this way:
FileStream forceNewFileNamed: 'test' do: [:str | str nextPutAll:
'whateverRootObject' sixxString ].
And then in Pharo I read like:
SixxShapeChangeReadStream on: (FileStream oldFileNamed: 'test')
For some files, the above works OK. But for other files, while reading in
Pharo I get a: "UTF8Error: Invalid UTF8 input detected"
The problem is that FileStream oldFileNamed: in Pharo answers a
MultiByteFileStream, which uses a UTF8TextConverter. Hence, in
UTF8TextConverter >> nextFromStream: I get an error because 'unicode'
instVar is nil.
Of course, if in Pharo I use directly a StandardFileStream oldFileNamed:
(to avoid using MultiByteFileStream) I can indeed read those files.
So...how should I make this to work in GemStone and Pharo? I know Johan
ported the text converters and MultiByteBinaryOrTextStream. But I don't
know how to get a similar MultiByteFileStream for GemStone.
Thanks in advance,
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140415/2a0a744f/attachment.html>
More information about the Glass
mailing list