Message23492
Logged In: YES
user_id=89016
> The problem with the change is that it applies to *all*
> codecs. If only the UTF-16 codec has a problem with the
> standard logic, it should override the .readline()
> method as necessary, but this should not affect all
> the other codecs.
readline() had to be rewritten anyway to take the
bytebuffer into account. True, the bytebuffer is
only needed for UTF-8, UTF-16, UTF-16-LE, UTF-16-BE
and maybe a few others, but unless we'd introduced a
ByteBufferStreamReader that those codecs can subclass
this would have meant code duplication.
I'try to come up with a readline() patch (for the base
class readline() next week.
>
>> BTW, the logic in read() looks rather convoluted to me
>> now that a look at it a second time. Should we clean
>> this up a bit?
>
> If that's possible, yes :-)
Attached is a patch (fixread.diff) that makes read()
a *little* simpler. Making it much simple breaks several
tests.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:28:04 | admin | link | issue1076985 messages |
2007-08-23 14:28:04 | admin | create | |
|