add optional encoding
This commit is contained in:
parent
db1c09c6d2
commit
a1b89b7d93
|
@ -15,9 +15,9 @@ import sys
|
|||
|
||||
class InputStream (object):
|
||||
|
||||
def __init__(self, data):
|
||||
def __init__(self, data, encoding = "ascii"):
|
||||
self.name = "<empty>"
|
||||
self.strdata = unicode(data)
|
||||
self.strdata = unicode(data, encoding)
|
||||
self._loadString()
|
||||
|
||||
def _loadString(self):
|
||||
|
|
Loading…
Reference in New Issue