diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-10-15 21:36:56 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-10-15 21:36:56 (GMT) |
commit | a5cd255a7cb15c7920171f0796cf163a00a5ecaf (patch) | |
tree | 829e414c09d9b59647517e63339bd17ac572d967 /Lib/logging/__init__.py | |
parent | 8ad0eac7ff030940949e26688311ec857999735d (diff) | |
download | cpython-a5cd255a7cb15c7920171f0796cf163a00a5ecaf.zip cpython-a5cd255a7cb15c7920171f0796cf163a00a5ecaf.tar.gz cpython-a5cd255a7cb15c7920171f0796cf163a00a5ecaf.tar.bz2 |
Close #19267: Fix support of multibyte encoding (ex: UTF-16) in the logging
module.
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 0e8e3dd..cda781a 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -857,7 +857,7 @@ class StreamHandler(Handler): try: if (isinstance(msg, unicode) and getattr(stream, 'encoding', None)): - ufs = fs.decode(stream.encoding) + ufs = u'%s\n' try: stream.write(ufs % msg) except UnicodeEncodeError: |