From 4b1845c5cab1e1dbe5e5b82b3e30f50a39e2388b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 10 Feb 2018 12:04:39 +0100 Subject: [PATCH] doxygen: explicitly encode all output files as UTF-8. --- doxygen/dox2html5.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 5871616e..b09827d9 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -2730,8 +2730,8 @@ def run(doxyfile, templates=default_templates, wildcard=default_wildcard, index_ **state.doxyfile) output = os.path.join(html_output, file) - with open(output, 'w') as f: - f.write(rendered) + with open(output, 'wb') as f: + f.write(rendered.encode('utf-8')) else: parsed = parse_xml(state, file) if not parsed: continue @@ -2761,8 +2761,8 @@ def run(doxyfile, templates=default_templates, wildcard=default_wildcard, index_ FILENAME='index.html', **state.doxyfile) output = os.path.join(html_output, 'index.html') - with open(output, 'w') as f: - f.write(rendered) + with open(output, 'wb') as f: + f.write(rendered.encode('utf-8')) if not state.doxyfile['M_SEARCH_DISABLED']: data = build_search_data(state, add_lookahead_barriers=search_add_lookahead_barriers, merge_subtrees=search_merge_subtrees, merge_prefixes=search_merge_prefixes) -- 2.30.2