diff --git a/pyshbundle/reader_replacer_csr.py b/pyshbundle/reader_replacer_csr.py index c60fe032..e28a4d60 100644 --- a/pyshbundle/reader_replacer_csr.py +++ b/pyshbundle/reader_replacer_csr.py @@ -67,7 +67,7 @@ def reader(file_name,line_num,degree,order,clm,slm,clm_std,slm_std,start_date,en year_start (_type_): _description_ time_axes (_type_): _description_ """ - with gzip.open(file_name,"r") as file: + with gzip.open(file_name,"r", encoding='utf8') as file: stuff = file.readlines() stuff for i in range (0,len(stuff),1): @@ -172,7 +172,7 @@ def reader_replacer_csr(path, path_tn14, path_tn13): # ''' Replace deg 2,3 ''' new_file_TN14 = path_tn14 rep_start_date, rep_end_date, c20, c30, c20_sigma, c30_sigma = [], [], [], [], [], [] - with open(new_file_TN14,"r") as file: + with open(new_file_TN14,"r", encoding='utf8') as file: stuff = file.readlines() for i in range(0,len(stuff),1): line_num = str('not found') @@ -224,7 +224,7 @@ def reader_replacer_csr(path, path_tn14, path_tn13): #''' Replace deg 1 ''' new_file_TN13 = path_tn13 rep_start_date_deg1, rep_end_date_deg1, c1m, s1m, c1m_sigma, s1m_sigma = [], [], [], [], [], [] - with open(new_file_TN13,"r") as file: + with open(new_file_TN13,"r", encoding='utf8') as file: stuff = file.readlines() for i in range(0,len(stuff),1): if stuff[i] == str('end of header ===============================================================================\n'):