Hi Vinay,
I think I figured out what you are talking about after reading RFC
5424. I think this means that this code
syslog.info("Status - " + mcu_dict[pinged.ip] + " is " + status[pinged.status])
needs to become something like this
BOM = 0xEFBBBF
msg = str(BOM) + "Status - " + mcu_dict[pinged.ip] + " is " +
status[pinged.status]
syslog.info(msg)
This would add the BOM to the message that RFC 5424 requires. Or did I totally
misread it?
Thanks,
Joe
On Jul 14, 2010, at 8:20 PM, Vinay Sajip wrote:
> On Jul 14, 7:08 pm, Joe Hughes <[email protected]> wrote:
>> This is why I did what I did, because I couldn't figure it out either. I
>> did find issue 5421 at python.org which is where I got the idea for the code
>> change.
>
> Perhaps you should read the messages for issue 7077, linked to by
> Peter above. You'll see that according to RFC 5424, syslog UDP
> messages should be encoded in UTF-8 with a BOM, not ASCII. Revisions
> r75586 and later of the Python repository implement the correct fix
> for the problem.
>
> My suggestion (in the blog post I linked to) would apply to socket
> applications other than syslog.
>
> Regards,
>
> Vinay Sajip
> --
> http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list