Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.

This commit is contained in:
Vinay Sajip 2009-10-21 20:22:14 +00:00
parent ff8c1e5ace
commit 42ead48dc1
2 changed files with 6 additions and 0 deletions

View file

@ -779,6 +779,10 @@ def emit(self, record):
self.encodePriority(self.facility,
self.mapPriority(record.levelname)),
msg)
#Message is a string. Convert to bytes as required by RFC 5424
msg = msg.encode('utf-8')
if codecs:
msg = codecs.BOM_UTF8 + msg
try:
if self.unixsocket:
try:

View file

@ -104,6 +104,8 @@ C-API
Library
-------
- Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.
- Issue #7099: Decimal.is_normal now returns True for numbers with exponent
larger than emax.