Skip to content

Commit 4b018a2

Browse files
committed
[fix] issue 266: unicode characters in elk files (#267)
* replace unicode characters in elk files by ascii characters if present
1 parent c19cbe7 commit 4b018a2

File tree

1 file changed

+4
-1
lines changed
  • python/triqs_dft_tools/converters

1 file changed

+4
-1
lines changed

python/triqs_dft_tools/converters/elk.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ def __init__(self, filename, hdf_filename=None,
8989
self.misc_subgrp = misc_subgrp
9090
self.transp_subgrp = transp_subgrp
9191
self.cont_subgrp = cont_subgrp
92-
self.fortran_to_replace = {'D': 'E'}
92+
self.fortran_to_replace = {'D': 'E',
93+
# replaces unicode characters with ascii ones if present
94+
'┌': '+', '┐': '+', '└': '+', '┘': '+',
95+
'─': '-', '│': '|'}
9396

9497
# Checks if h5 file is there and repacks it if wanted:
9598
if (os.path.exists(self.hdf_file) and repacking):

0 commit comments

Comments
 (0)