From: Vinay Sajip Date: Mon, 16 Apr 2012 13:38:23 +0000 (+0100) Subject: Issue #14452: remove BOM insertion code. X-Git-Tag: v2.7.4rc1~899 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e9c9d51b640f0486b4b31f8bf5fe21d1fe7ee11;p=thirdparty%2FPython%2Fcpython.git Issue #14452: remove BOM insertion code. --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 6bbc1f71b6ee..0eb36f3f2206 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler): # Message is a string. Convert to bytes as required by RFC 5424 if type(msg) is unicode: msg = msg.encode('utf-8') - if codecs: - msg = codecs.BOM_UTF8 + msg msg = prio + msg try: if self.unixsocket: diff --git a/Misc/NEWS b/Misc/NEWS index e35b9f3df31c..71218d7f4a4b 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -48,6 +48,8 @@ Core and Builtins Library ------- +- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message. + - Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied to a collection of size > sys.maxsize / 2.