[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

STINNER Victor report at bugs.python.org
Thu Mar 26 18:52:41 CET 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Faster patch!
 - add fast encoder for UTF-32, UTF-32-LE and UTF-32-BE (copy/paste of 
utf16 functions)
 - move utf-8 before utf-16-* because utf8 more popular than utf16 :-p
 - don't set self->encodefunc=NULL (loose all the encoder 
optimisation), but only fix self->encodefunc for two special cases: 
utf16=>utf16le or utf16be and utf32=>utf32le or utf32be
 - remove self->ok: it was may be usefull for an older version of my 
patch, but it's not more needed

----------
Added file: http://bugs.python.org/file13421/append_bom-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5006>
_______________________________________


More information about the Python-bugs-list mailing list