[issue1328] Force BOM option in UTF output.
Walter Dörwald
report at bugs.python.org
Sat Mar 22 15:44:53 CET 2008
Walter Dörwald <walter at livinglogic.de> added the comment:
Oops, that code was supposed to read:
import codecs
def search_function(name):
if name == "myutf8":
utf8 = codecs.lookup("utf-8")
utf8_sig = codecs.lookup("utf-8-sig")
return codecs.CodecInfo(
name='myutf8',
encode=utf8.encode,
decode=utf8_sig.decode,
incrementalencoder=utf8.incrementalencoder,
incrementaldecoder=utf8_sig.incrementaldecoder,
streamreader=utf8_sig.streamreader,
streamwriter=utf8.streamwriter,
)
codecs.register(search_function)
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1328>
__________________________________
More information about the Python-bugs-list
mailing list