Open alandtse opened 2 years ago
-with open(args.output_file_html, 'w+') as fh:
- with open(args.json_file, 'r') as lj:
+with open(args.output_file_html, 'w+', encoding='utf-8') as fh:
+ with open(args.json_file, 'r', encoding='utf-8') as lj:
should fix it.
On Windows, I'm getting an encoding error when generating a html report where the input copyright data may have bad encodings. On my MacOS device, the same code does not generate the error.
The specific cause is the
fh.write
here:This is tied to the copyright data picked up in the copyright scan. In this case, it's this line in the raw json.
which when parsed by
template.render()
and is converted to�
.This is being discovered in the following component in the
CopyrightTexts
section of notices.json.