GTI: Add utf16 file handling

This commit is contained in:
Worros 2010-11-15 13:39:36 +08:00
parent a4885243de
commit f7f8122af8

View File

@ -238,7 +238,7 @@ class SummaryImporter:
self.filelist = {}
def readFile(self, tsc, filename):
codepage = ["utf8"]
codepage = ["utf8", "utf16"]
whole_file = None
tsc.codepage
@ -248,7 +248,8 @@ class SummaryImporter:
whole_file = in_fh.read()
in_fh.close()
break
except:
except UnicodeDecodeError, e:
log.warn(_("GTI.readFile: '%s'") % e)
pass
return whole_file