On Wed, Jul 31, 2013 at 5:03 PM, Domenic Denicola <dome...@domenicdenicola.com> wrote: > In this way, the encoding is a stateful aspect of the stream itself. I don't > think there's a way to get around this, without ending up with dangling > half-character bytes hanging around.
It seems though that if you can change the way bytes are consumed while reading a stream you will end up with problematic scenarios. E.g. you consume 2 bytes of a 4-byte utf-8 sequence. Then switch to reading code points... Instantiating a ByteStream or TextStream in advance would address that. -- http://annevankesteren.nl/