Skip to content

Commit

Permalink
Fix issue #98.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmtroffaes committed Mar 26, 2024
1 parent 2f6a1a8 commit f5b98b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion latexcodec/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class UnicodeLatexTranslation:


def load_unicode_latex_table() -> Iterator[UnicodeLatexTranslation]:
with pkg_resources.open_text('latexcodec', 'table.txt') as datafile:
with (pkg_resources.files('latexcodec') / 'table.txt').open(
'r', encoding='utf-8', errors='strict') as datafile:
for line in datafile:
marker, unicode_names, latex = line.rstrip('\r\n').split('\u0009')
unicode = ''.join(
Expand Down

0 comments on commit f5b98b6

Please sign in to comment.