mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Patch #1455898: Incremental mode for "mbcs" codec.
This commit is contained in:
parent
6ce9fe880b
commit
d825143be1
6 changed files with 214 additions and 50 deletions
|
@ -22,9 +22,10 @@ class IncrementalEncoder(codecs.IncrementalEncoder):
|
|||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue