Skip to content

Commit

Permalink
set default encoding to utf-8 when reading files
Browse files Browse the repository at this point in the history
  • Loading branch information
wahlflo committed Aug 4, 2023
1 parent 8eec8d7 commit 50dfa3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eml_analyzer/cli_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def main():
argument_parser = argparse.ArgumentParser(prog='emlAnalyzer', description='A CLI script to analyze an email in the EML format for viewing headers, extracting attachments, etc.')
argument_parser.add_argument('-i', '--input', help="Path to the EML file. Accepts standard input if omitted", type=argparse.FileType('r'), nargs='?', default=sys.stdin)
argument_parser.add_argument('-i', '--input', help="Path to the EML file. Accepts standard input if omitted", type=argparse.FileType('r', encoding='utf-8'), nargs='?', default=sys.stdin)
argument_parser.add_argument('--header', action='store_true', default=False, help="Shows the headers")
argument_parser.add_argument('-x', '--tracking', action='store_true', default=False, help="Shows content which is reloaded from external resources in the HTML part")
argument_parser.add_argument('-a', '--attachments', action='store_true', default=False, help="Lists attachments")
Expand Down

0 comments on commit 50dfa3d

Please sign in to comment.