Skip to content

Commit

Permalink
[fix] issue 266: unicode characters in elk files (#267)
Browse files Browse the repository at this point in the history
* replace unicode characters in elk files by ascii characters if present
  • Loading branch information
the-hampel committed Feb 5, 2025
1 parent c19cbe7 commit 4b018a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/triqs_dft_tools/converters/elk.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ def __init__(self, filename, hdf_filename=None,
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):
Expand Down

0 comments on commit 4b018a2

Please sign in to comment.