Am 2008-10-02 um 18:21 schrieb Sibylle Koczian: > Without the line "app.DatabaseActivityLog = sys.stdout" the > application works > as expected, field content with non-ASCII characters is saved > normally. > > On the one hand I should have thought of this, > because "sys.stdout.write(u'äöü')" raises the same > UnicodeEncodeError. On the > other hand the traceback for this case definitely doesn't help. And > why is > saving the record impossible, just because the _logging_ raises an > exception? > > I've tried to wrap sys.stdout using codecs.EncodedFile, but without > success. I > don't know which input and output encoding would be right. My system > charset > is UTF-8. > > Would it be possible to have DatabaseActivityLog write something > like "repr(theUnicodeObject)"? Not very pretty, but for diagnostic > purposes > perhaps acceptable?
You can't simply print python unicode objects to stdout. Just change your wrapper that it works like sys.stdout.write(u'äöü'.encode('utf-8')) Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) _______________________________________________ Post Messages to: Dabo-users@leafe.com 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]