forked from expo/troggle
catch nonUTF8 survex files, DataIssues url editor
This commit is contained in:
@@ -119,9 +119,14 @@ class SvxForm(forms.Form):
|
||||
print(">>> >>> WARNING - svx file not found, showing TEMPLATE SVX",fname, flush=True)
|
||||
self.template = True
|
||||
return survextemplatefile
|
||||
fin = open(fname, "r",encoding='utf8',newline='')
|
||||
svxtext = fin.read()
|
||||
fin.close()
|
||||
try:
|
||||
fin = open(fname, "r",encoding='utf8',newline='')
|
||||
svxtext = fin.read()
|
||||
fin.close()
|
||||
except:
|
||||
fin = open(fname, "r",encoding='iso-8859-1',newline='')
|
||||
svxtext = fin.read()
|
||||
fin.close()
|
||||
return svxtext
|
||||
|
||||
def DiffCode(self, rcode):
|
||||
|
||||
Reference in New Issue
Block a user