[#1453] StringIO unicode problem

[email protected] (saper) Thu, 29 Oct 2009 19:02:59 -0700
Newsgroups gmane.comp.web.zope.zwiki
Message-ID <20091029190252-0700__25056.8435447805$1256868198$gmane$org@zwiki.org>
http://docs.python.org/library/stringio.html says: 
     The StringIO object can accept either Unicode or 8-bit strings, but mixing the two may take some care. If both are used, 8-bit strings   that cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause a UnicodeError to be raised when getvalue() is called.

This is what happens: the output.buflist[206] (contains contents of <textarea> tag) is of type'str', not 'unicode', although
there are some other type'unicode' elements. Adding talsafe() does not help, since this is noop on zope < (2,10).




--
forwarded from http://zwiki.org/1453AnotherUnicodeDecodeErrorDuringEditPreview#[email protected]