Serhiy Storchaka added the comment:

> Hum no. The bug is an issue in the design of codecs.Stream* classes: 
> incremental decoders and encoders should be used instead of classic 
> decoders/encoders.

I don't understand you. StreamReader and IncrementalDecoder both use the same 
decoder.

class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
    _buffer_decode = codecs.utf_16_le_decode

class StreamReader(codecs.StreamReader):
    decode = codecs.utf_16_le_decode

> I don't want to fix this issue: it's better to move to the io library for the 
> reasons listed in the PEP 400.

The bug in utf-16 decoder, not in codecs.StreamReader.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15278>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to