STINNER Victor <[EMAIL PROTECTED]> added the comment: Ugly patch to fix this issue: - add more regression tests for charsets UTF-16*, UTF-32* - add mandatory argument "encoding" to io.IncrementalNewlineDecoder constructor => BREAK THE API - use the encoding the encode "\r" - most ulgy hack: strip the BOM for codecs "UTF-16" and "UTF-32" (when encoding "\r" to bytes) => I don't know how to encode "\r" without the BOM
Added file: http://bugs.python.org/file12298/incremental_newline_decoder-2.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4574> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com