1 """ Python 'utf-16-le' Codec
4 Written by Marc-Andre Lemburg (mal@lemburg.com).
6 (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
13 encode
= codecs
.utf_16_le_encode
15 def decode(input, errors
='strict'):
16 return codecs
.utf_16_le_decode(input, errors
, True)
18 class IncrementalEncoder(codecs
.IncrementalEncoder
):
19 def encode(self
, input, final
=False):
20 return codecs
.utf_16_le_encode(input, self
.errors
)[0]
22 class IncrementalDecoder(codecs
.BufferedIncrementalDecoder
):
23 _buffer_decode
= codecs
.utf_16_le_decode
25 class StreamWriter(codecs
.StreamWriter
):
26 encode
= codecs
.utf_16_le_encode
28 class StreamReader(codecs
.StreamReader
):
29 decode
= codecs
.utf_16_le_decode
31 ### encodings module API
34 return codecs
.CodecInfo(
38 incrementalencoder
=IncrementalEncoder
,
39 incrementaldecoder
=IncrementalDecoder
,
40 streamreader
=StreamReader
,
41 streamwriter
=StreamWriter
,