Patch #1455898: Incremental mode for "mbcs" codec.
diff --git a/Lib/encodings/mbcs.py b/Lib/encodings/mbcs.py
index ff77fde..a44ee7b 100644
--- a/Lib/encodings/mbcs.py
+++ b/Lib/encodings/mbcs.py
@@ -22,9 +22,10 @@
def encode(self, input, final=False):
return codecs.mbcs_encode(input,self.errors)[0]
-class IncrementalDecoder(codecs.IncrementalDecoder):
- def decode(self, input, final=False):
- return codecs.mbcs_decode(input,self.errors)[0]
+class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
+ def _buffer_decode(self, input, errors, final):
+ return codecs.mbcs_decode(input,self.errors,final)
+
class StreamWriter(Codec,codecs.StreamWriter):
pass