Skip to content

Commit

Permalink
Fix encoding error (issue #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
almiheenko committed Nov 14, 2019
1 parent 9c1b39c commit f10fc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agb_src/scripts/utils.py
Expand Up @@ -218,7 +218,7 @@ def embed_css_and_scripts(html):
line = line_tmpl % rel_fpath
l_tag_formatted = l_tag % rel_fpath

with open(fpath) as f: contents = f.read()
with os.io.open(fpath, 'r', encoding="utf-8") as f: contents = f.read()

This comment has been minimized.

Copy link
@PerisD

PerisD Dec 27, 2019

This command is not working properly. The one was working is:
with open(fpath, 'r', encoding="utf-8") as f: contents = f.read()

contents = '\n'.join(' ' * 8 + l for l in contents.split('\n'))
html = html.replace(line, l_tag_formatted + '\n' + contents + '\n' + r_tag)

Expand Down

0 comments on commit f10fc10

Please sign in to comment.