[issue14452] SysLogHandler sends invalid messages when using unicode

Vinay Sajip report at bugs.python.org
Fri Mar 30 20:32:55 CEST 2012


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> the RFC specifies that the BOM should prefix only unstructured
> message part, but current Python implementation puts it in the
> middle of structured part, thus confusing RFC-compliant receivers.

How do you work that out? The implementation puts the BOM before the message part:

        prio = '<%d>' % self.encodePriority(...)
        prio = prio.encode('utf-8')
        msg = msg.encode('utf-8')
        if codecs:
            msg = codecs.BOM_UTF8 + msg
        msg = prio + msg

Perhaps I've misunderstood you or the RFC5424, but I don't quite see how. I'll mark this as "pending" and "invalid" awaiting a clarification from you (ideally with a specific example).

----------
resolution:  -> invalid
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14452>
_______________________________________


More information about the Python-bugs-list mailing list