I received an issue track telling me that unicode was not supported by logbook module. When we tried to write log entries in any non-pure ascii language (like Swedish or Spanish), an UnicodeDecodeError was raised if non-ascii character were used (like with the words häj or España).
I was looking at that and I found that python was trying to decode the record.message with the default decoder charset, which is 'ascii'. So what I've done is add a previous decoding in the format function of the generic handler.
I was trying all handlers and a similar problem was happening with MailHandler. As python default mail module also does not support unicode without parsing it, I added also a previous parsing in generate_mail function.
I hope this is helpful for you, and sorry if not.
Added previous decoding to support non-ascii characters. Fixed also u…
…nicode email problems
Guillermo, can't you just use python's "chardet" for that instead of manually selecting the encoding?
Fixed sending non-ascii messages
This should fix issue #52.
Please use the patchset in #62 instead of this: it is much less approximative. The suggestion of using chardet is also unreliable, apart of being a likely blow to the performance.
Pull request #62 indeed superseeds this one, @guillermo-carrasco, so dropping your changes...