Fix problem with finding HHs for utf-16 files.
This commit is contained in:
parent
3630a289ad
commit
7d7ba94da1
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user