Fix problem with finding HHs for utf-16 files.

This commit is contained in:
Eratosthenes 2010-01-26 10:56:07 -05:00 committed by Worros
parent 6c5c479ee8
commit e0d11fe9a3

View File

@ -440,10 +440,9 @@ or None if we fail to get the info """
#print "trying", kodec #print "trying", kodec
try: try:
in_fh = codecs.open(self.in_path, 'r', kodec) in_fh = codecs.open(self.in_path, 'r', kodec)
in_fh.seek(self.index) whole_file = in_fh.read()
log.debug("Opened in_path: '%s' with %s" % (self.in_path, kodec)) self.obs = whole_file[self.index:]
self.obs = in_fh.read() self.index = len(whole_file)
self.index = in_fh.tell()
in_fh.close() in_fh.close()
break break
except: except: