utf_16_le.py 585 B

1234567891011121314151617181920212223242526272829
  1. """ Python 'utf-16-le' Codec
  2. Written by Marc-Andre Lemburg ([email protected]).
  3. (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
  4. """
  5. import codecs
  6. ### Codec APIs
  7. encode = codecs.utf_16_le_encode
  8. def decode(input, errors='strict'):
  9. return codecs.utf_16_le_decode(input, errors, True)
  10. class StreamWriter(codecs.StreamWriter):
  11. encode = codecs.utf_16_le_encode
  12. class StreamReader(codecs.StreamReader):
  13. decode = codecs.utf_16_le_decode
  14. ### encodings module API
  15. def getregentry():
  16. return (encode,decode,StreamReader,StreamWriter)