Fixes #6655 catch unicode encoding errors before sending to syslog