From 4b018a25f3d72fecda8e4347dd0a297b36133d8e Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Wed, 5 Feb 2025 14:38:36 +0100 Subject: [PATCH] [fix] issue 266: unicode characters in elk files (#267) * replace unicode characters in elk files by ascii characters if present --- python/triqs_dft_tools/converters/elk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/triqs_dft_tools/converters/elk.py b/python/triqs_dft_tools/converters/elk.py index 27bfc3b8..e58fb219 100644 --- a/python/triqs_dft_tools/converters/elk.py +++ b/python/triqs_dft_tools/converters/elk.py @@ -89,7 +89,10 @@ class ElkConverter(ConverterTools,Elk_tools,read_Elk): self.misc_subgrp = misc_subgrp self.transp_subgrp = transp_subgrp self.cont_subgrp = cont_subgrp - self.fortran_to_replace = {'D': 'E'} + self.fortran_to_replace = {'D': 'E', + # replaces unicode characters with ascii ones if present + '┌': '+', '┐': '+', '└': '+', '┘': '+', + '─': '-', '│': '|'} # Checks if h5 file is there and repacks it if wanted: if (os.path.exists(self.hdf_file) and repacking):