Last Comment Bug 839357 - bugmail syslog logging is throwing "Wide character in syswrite"
: bugmail syslog logging is throwing "Wide character in syswrite"
Classification: Other
Component: General (show other bugs)
: Production
: x86 Mac OS X
-- normal (vote)
: ---
Assigned To: Byron Jones ‹:glob›
Depends on: 836213
  Show dependency treegraph
Reported: 2013-02-07 19:23 PST by Byron Jones ‹:glob›
Modified: 2013-03-12 09:01 PDT (History)
4 users (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Byron Jones ‹:glob› 2013-02-07 19:23:06 PST
from bug 836213 comment 4

Wide character in syswrite at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Sys/ line 765. at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Sys/ line 765 Sys::Syslog::_syslog_send_socket('<165>Feb 7 05:22:55 apache[2970]: [bugma 

From my understanding of the docs (and I should have seen this before when doing the review :() we need to encode_utf8 instead of decode_utf8 as syslog needs the characters in bytestream (binary) format or octets. So maybe we just need to make one simple change?

@@ -962,7 +960,7 @@
     $subject =~ s/[\[\(]Bug \d+[\]\)]\s*//;
     openlog('apache', 'cons,pid', 'local4');
-    syslog('notice', decode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject"));
+    syslog('notice', encode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject"));
Comment 2 User image Byron Jones ‹:glob› 2013-03-12 09:01:42 PDT

Committing to: bzr+ssh://
modified extensions/BMO/
Committed revision 8650.

Note You need to log in before you can comment on or make changes to this bug.