> On 08 Dec 2014, at 22:27, [email protected] wrote: > > Hi, > I've been looking into MultiByteFileStream for adding tests in this area, and > have come up against what appears to me to be an anomaly. I ran the > following 4 tests: > > > FileStream fileNamed: 'test.txt' > do: [ :str | str > nextPutAll: '123'; > crlf ]. > > MultiByteFileStream fileNamed: 'test2.txt' > do: [ :str | str > nextPutAll: '123'; > crlf ]. > > FileStream fileNamed: 'test3.txt' > do: [ :str | str > nextPutAll: 'élève en Français'; > crlf ]. > > MultiByteFileStream fileNamed: 'test4.txt' > do: [ :str | str > nextPutAll: 'élève en Français'; > crlf ]. > > > The results are: > > Input string Result Unix File > Class Class Type > --------------------------------------------------------------- > FileStream '123' MultiByte- ASCII text > FileStream > > MultiByte- '123' MultiByte- ASCII text > FileStream FileStream > > FileStream 'élève en MultiByte- UTF-8 Unicode > Français' FileStream > > MultiByte- 'élève en MultiByte- UTF-8 Unicode > FileStream Français' FileStream > > > Do operations involving FileStream as input always return a > MultiByteFileStream?
Yes. They also use UTF-8 by default (ASCII is a proper subset of UTF-8). > Thanks, > Sheridan >
