Nov. 17, 2011
10:31 p.m.
Am 17.11.2011 um 22:01 schrieb Tudor Girba:
Hi,
I am using Filesystem, and I would like to get a read stream that provides a string instead of bytes.
If I do "aReference readStream", I get a FSReadStream which is a byte stream.
To get to the string, I now do the ugly: "aReference readStream contents asString"
Is there a cleverer way?
I don't know FileSystem. But in any case a bytestream is correct. In order to get a string you need to decode it. Only for ascii this is null codec. For any other encoded file you won't get what you want. So, using a textconverter with file encoding might get you what you want. Norbert