[Python-checkins] python/dist/src/Lib/encodings utf_16.py, 1.5,
1.5.2.1
doerwalter at users.sourceforge.net
doerwalter at users.sourceforge.net
Mon Mar 14 20:20:23 CET 2005
Update of /cvsroot/python/python/dist/src/Lib/encodings
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14630/Lib/encodings
Modified Files:
Tag: release24-maint
utf_16.py
Log Message:
Backport checkin:
Reset internal buffers when seek() is called. This fixes SF bug #1156259.
Index: utf_16.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/utf_16.py,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- utf_16.py 7 Sep 2004 20:24:21 -0000 1.5
+++ utf_16.py 14 Mar 2005 19:20:18 -0000 1.5.2.1
@@ -31,6 +31,13 @@
class StreamReader(codecs.StreamReader):
+ def reset(self):
+ codecs.StreamReader.reset(self)
+ try:
+ del self.decode
+ except AttributeError:
+ pass
+
def decode(self, input, errors='strict'):
(object, consumed, byteorder) = \
codecs.utf_16_ex_decode(input, errors, 0, False)
More information about the Python-checkins
mailing list