From: Vinay Sajip Date: Mon, 16 Apr 2012 13:39:53 +0000 (+0100) Subject: Closes #14452: remove BOM insertion code. X-Git-Tag: v3.3.0a3~202^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee9e485c214b9348bc2e6bd3771d1a9be004a653;p=python Closes #14452: remove BOM insertion code. --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 7689b040c6..65b0a2da00 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -808,8 +808,6 @@ class SysLogHandler(logging.Handler): prio = prio.encode('utf-8') # Message is a string. Convert to bytes as required by RFC 5424 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 0a7ea9a7aa..adb0b08f22 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -43,6 +43,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.