I'm getting a
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 34: ordinal not in range(128)
on a string stored in 'a.desc' below as it contains the '£' character. It's stored in the underlying Google App Engine datastore as a unicode string so that's fine. The cStringIO.StringIO.writelines function is trying seemingly trying to encode it in ascii format:
result.writelines(['blahblah',a.desc,'blahblahblah'])
How do I instruct it to treat the encoding as unicode if that's the correct phrasing?
app engine runs on python 2.5