]> granicus.if.org Git - python/commit
SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support
authorWalter Dörwald <walter@livinglogic.de>
Tue, 7 Sep 2004 20:24:22 +0000 (20:24 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Tue, 7 Sep 2004 20:24:22 +0000 (20:24 +0000)
commit69652035bc2cf22b0326bb00824f4b7e2674cc8b
tree088104a47f9c9cfc466a3e1c5f4d2560b2d41450
parenta708d6e3b0aa2d225d4e5ab338862f67994e1c45
SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support
decoding incomplete input (when the input stream is temporarily exhausted).
codecs.StreamReader now implements buffering, which enables proper
readline support for the UTF-16 decoders. codecs.StreamReader.read()
has a new argument chars which specifies the number of characters to
return. codecs.StreamReader.readline() and codecs.StreamReader.readlines()
have a new argument keepends. Trailing "\n"s will be stripped from the lines
if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and
PyUnicode_DecodeUTF16Stateful.
12 files changed:
Doc/api/concrete.tex
Doc/lib/libcodecs.tex
Include/unicodeobject.h
Lib/codecs.py
Lib/encodings/utf_16.py
Lib/encodings/utf_16_be.py
Lib/encodings/utf_16_le.py
Lib/encodings/utf_8.py
Lib/test/test_codecs.py
Misc/NEWS
Modules/_codecsmodule.c
Objects/unicodeobject.c