We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9460bc9 commit 48f65a3Copy full SHA for 48f65a3
1 file changed
src/inputstream.py
@@ -76,7 +76,9 @@ def openStream(self, source):
76
if hasattr(source, 'read'):
77
stream = source
78
else:
79
- # Otherwise treat source as a string and convert to a file object
+ # Otherwise treat source as a string and convert to a file object
80
+ if isinstance(source, unicode):
81
+ source = source.encode('utf-8')
82
import cStringIO
83
stream = cStringIO.StringIO(str(source))
84
return stream
0 commit comments