Skip to content

Commit

Permalink
fix missing encoding indication on pretty mode (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault authored Aug 31, 2024
1 parent 344dc64 commit 2920d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json2xml/json2xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def to_xml(self) -> Any | None:
)
if self.pretty:
try:
result = parseString(xml_data).toprettyxml()
result = parseString(xml_data).toprettyxml(encoding="UTF-8").decode()
except ExpatError:
raise InvalidDataError
return result
Expand Down

0 comments on commit 2920d71

Please sign in to comment.