summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/views/survex.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/views/survex.py b/core/views/survex.py
index 21603bc..caeaba6 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -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):