fix failing Python2 tests with utf-8 encoding
This commit is contained in:
parent
fa0c0b665e
commit
9a288bcb25
|
@ -17,7 +17,7 @@ class InputStream (object):
|
|||
|
||||
def __init__(self, data, encoding = "ascii"):
|
||||
self.name = "<empty>"
|
||||
self.strdata = unicode(data, encoding) if encoding != "utf-8" else data
|
||||
self.strdata = data if isinstance(data, unicode) else unicode(data, encoding)
|
||||
self._loadString()
|
||||
|
||||
def _loadString(self):
|
||||
|
|
Loading…
Reference in New Issue