99
1010import re
1111
12- from dsc_datatool import Input , Dataset , Dimension , process_dataset
12+ from dsc_datatool import Input , Dataset , Dimension , process_dataset , encoding
1313
1414
1515_dataset1d = [
@@ -78,7 +78,7 @@ def process(self, dir):
7878
7979 def process1d (self , file , name ):
8080 datasets = []
81- with open (file , 'r' ) as f :
81+ with open (file , 'r' , encoding = encoding ) as f :
8282 for l in f .readlines ():
8383 if re .match (r'^#' , l ):
8484 continue
@@ -103,7 +103,7 @@ def process1d(self, file, name):
103103
104104 def process2d (self , file , name , field ):
105105 datasets = []
106- with open (file , 'r' ) as f :
106+ with open (file , 'r' , encoding = encoding ) as f :
107107 for l in f .readlines ():
108108 if re .match (r'^#' , l ):
109109 continue
@@ -135,7 +135,7 @@ def process2d(self, file, name, field):
135135
136136 def process3d (self , file , name , first , second ):
137137 datasets = []
138- with open (file , 'r' ) as f :
138+ with open (file , 'r' , encoding = encoding ) as f :
139139 for l in f .readlines ():
140140 if re .match (r'^#' , l ):
141141 continue
0 commit comments