##// END OF EJS Templates
Merge pull request #2500 from bfroehle/outstream_encoding...
Bradley M. Froehle -
r8597:2e1736cc merge
parent child Browse files
Show More
@@ -4,7 +4,7 b' from io import StringIO'
4 4
5 5 from session import extract_header, Message
6 6
7 from IPython.utils import io, text, encoding
7 from IPython.utils import io, text
8 8 from IPython.utils import py3compat
9 9
10 10 #-----------------------------------------------------------------------------
@@ -23,6 +23,7 b' class OutStream(object):'
23 23 topic=None
24 24
25 25 def __init__(self, session, pub_socket, name):
26 self.encoding = 'UTF-8'
26 27 self.session = session
27 28 self.pub_socket = pub_socket
28 29 self.name = name
@@ -73,9 +74,8 b' class OutStream(object):'
73 74 else:
74 75 # Make sure that we're handling unicode
75 76 if not isinstance(string, unicode):
76 enc = encoding.DEFAULT_ENCODING
77 string = string.decode(enc, 'replace')
78
77 string = string.decode(self.encoding, 'replace')
78
79 79 self._buffer.write(string)
80 80 current_time = time.time()
81 81 if self._start <= 0:
General Comments 0
You need to be logged in to leave comments. Login now