Skip to content

Commit

Permalink
fix: let the XML parser choose the character set encoding
Browse files Browse the repository at this point in the history
this fixes XML parsing on platforms where the default character
set encoding isn't UTF-8
  • Loading branch information
Derek Moore authored and 0xB10C committed Dec 25, 2023
1 parent f5c9e60 commit 6b2ef89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generate-address-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def parse_arguments():
description='Tool to extract sanctioned digital currency addresses from the OFAC special designated nationals XML file (sdn_advanced.xml)')
parser.add_argument('assets', choices=POSSIBLE_ASSETS, nargs='*',
default=POSSIBLE_ASSETS[0], help='the asset for which the sanctioned addresses should be extracted (default: XBT (Bitcoin))')
parser.add_argument('-sdn', '--special-designated-nationals-list', dest='sdn', type=open,
parser.add_argument('-sdn', '--special-designated-nationals-list', dest='sdn', type=argparse.FileType('rb'),
help='the path to the sdn_advanced.xml file (can be downloaded from https://www.treasury.gov/ofac/downloads/sanctions/1.0/sdn_advanced.xml)', default="./sdn_advanced.xml")
parser.add_argument('-f', '--output-format', dest='format', nargs='*', choices=OUTPUT_FORMATS,
default=OUTPUT_FORMATS[0], help='the output file format of the address list (default: TXT)')
Expand Down

0 comments on commit 6b2ef89

Please sign in to comment.