Skip to content

Commit

Permalink
add utf-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
affemitkaraffe committed Jul 26, 2023
1 parent a23b702 commit faf25f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/lib/rule_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def parse_xml(self):
# and they'd just slow everything down anyway.
@property
def xml_string(self):
return re.sub(self.entity_pattern, 'REPLACED_ENTITY', open(self.filepath).read()).encode('utf-8')
return re.sub(
self.entity_pattern, 'REPLACED_ENTITY', open(self.filepath, encoding='utf-8').read()).encode('utf-8')

@property
def name(self):
Expand Down

0 comments on commit faf25f8

Please sign in to comment.