On Oct 5, 2008, at 2:28 AM, Sibylle Koczian wrote:
>> Just change your wrapper that it works like
>> sys.stdout.write(u'äöü'.encode('utf-8'))
>
> It's the Dabo code using DatabaseActivityLog that does the writing.
> I could
> only replace sys.stdout with something else, and I don't quite know
> what
> with.
I think that the issue is that you are setting the log to a 'dumb'
device that expects these encoding issues to be taken care of
somewhere else. Perhaps you could use (untested) something like:
class StdOutEncoder(object):
def write(val):
try:
sys.stdout.write(val)
except UnicodeDecodeError:
sys.stdout.write(val.encode("utf-8")
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]