Decode CODA file content before parsing it
issue6884 review37781002
This commit is contained in:
1 parent
220f9aa48a
commit
aea58b48d7
1 file changed
+4
-1
+4
-1
@@ -34,7 +34,10 @@ class StatementImport:
|
||||
})
|
||||
|
||||
def parse_coda(self, encoding='windows-1252'):
|
||||
file_ = StringIO(unicode(self.start.file_, encoding=encoding))
|
||||
file_ = self.start.file_
|
||||
if not isinstance(file_, unicode):
|
||||
file_ = file_.decode(encoding)
|
||||
file_ = StringIO(file_)
|
||||
coda = CODA(file_)
|
||||
for coda_statement in coda.statements:
|
||||
statement = self.coda_statement(coda_statement)
|
||||
|
||||
Reference in new issue
Block a user