Martin Panter added the comment: FWIW I tend to use cStringIO.StringIO as a Python 2 replacement for io.StringIO to avoid this str vs unicode problem. But that only accepts ASCII, so won't help you if you really need the UTF-8 encoding step.
---------- nosy: +martin.panter _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29809> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com