Skip to content

Commit 94dbc86

Browse files
Fixed issue writing out UTF-8 encoded JSON
1 parent 0265c92 commit 94dbc86

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

arcpyext/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.7.35"
1+
__version__ = "0.7.36"
22
__author__ = "David Whittingham; David Payne; Adam Kerz; Peter Reyne; Daniel Baternik; Chris Blanchfield; Gary Bagnall"
33
__copyright__ = "Copyright (C) 2013-2024 David Whittingham"

arcpyext/mapping/_mapping3.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,9 @@ def register_xml_namespaces(filename):
213213
mapx_modified = True
214214

215215
if mapx_modified:
216-
with arc_file.open("w") as output_file_handle:
216+
with arc_file.open("w", encoding="utf-8") as output_file_handle:
217217
output_file_handle.write(
218-
json.dumps(map_json, sort_keys=True, indent=4, separators=(',', ': '),
219-
ensure_ascii=False).encode("UTF-8").decode("UTF-8")
218+
json.dumps(map_json, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
220219
)
221220

222221

0 commit comments

Comments
 (0)