I recently rediscovered this strange behaviour in Python’s Unicode handling.—Evan
Not really.—Walter

Sure. My point is that codecs should be stateful only to the extent needed to assemble semantically meaningful units (ie, multioctet coded characters). In particular, they should not need to know about location at the beginning, middle, or end of some stream---because in the context of operating on a string they _can’t_.—Stephen