Fix bug 9717, XML import with env language other than utf8, has bad progress meter
This commit is contained in:
parent
68bd1e9038
commit
ffa5b6db61
@ -361,9 +361,10 @@ class LineParser:
|
||||
# will not work properly, going immediately to
|
||||
# 100%.
|
||||
# It should work correctly from version 3.3.
|
||||
ofile = io.TextIOWrapper(gzip.open(filename, "rb"))
|
||||
ofile = io.TextIOWrapper(gzip.open(filename, "rb"),
|
||||
encoding='utf8', errors='replace')
|
||||
else:
|
||||
ofile = open(filename, "r")
|
||||
ofile = open(filename, "r", encoding='utf8', errors='replace')
|
||||
|
||||
for line in ofile:
|
||||
self.count += 1
|
||||
|
Loading…
Reference in New Issue
Block a user