There is an annoying error in MultiByteFileStream, reading back when you have a unicode character. It is also the cause of some FileOut errors. Your can reproduce it this way:

testString := 'abcd��'.
filename := 'test.txt'.
filename asFileReference ensureDelete.
filename asFileReference
writeStreamDo: [ :stream |��
stream
nextPutAll: testString ].

f := 'test.txt' asFileReference readStream.

f setToEnd.

f skip: -1.

f peek.


Any ideas how to solve it? Avoiding reading back is not an option ;). Maybe making skip to go back one more byte to check if there is a unicode character around?.

Thanks a lot.