codecs UTF-8 StreamReader ignores errors arg

A.M. Kuchling amk at mira.erols.com
Wed Dec 6 21:03:18 EST 2000


On Tue, 05 Dec 2000 12:20:12 GMT, wade at lightlink.com <wade at lightlink.com> wrote:
>mostly UTF-8, but with some bogus characters thrown in. The
>StreamReader class seems to ignore an 'errors' argument passed to its
>constructor, so it uses the default, which is 'strict'.

This is clearly a bug, as can be seen by looking at the code for
StreamReader in Lib/codecs.py.  I've submitted a patch to SourceForge
(#102698) to fix this, and appended it below.

An aside: Wade, did you look at Lib/codecs.py to find the cause?  I
interpret your message as meaning you did, since your suggested cause
is quite correct.  There's no need to be shy about saying that this is
a bug!

--amk




More information about the Python-list mailing list