Skip to content

Commit b70a244

Browse files
Merge pull request #7 from deepesdl/tejas-xxx-handle-special-chars-in-base-catalogs
handle unicodes
2 parents 43e3aea + 3e3a533 commit b70a244

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

deep_code/utils/github_automation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ def add_file(self, file_path: str, content):
8888
if not isinstance(content, (dict, list, str, int, float, bool, type(None))):
8989
raise TypeError(f"Cannot serialize content of type {type(content)}")
9090
try:
91-
json_content = json.dumps(content, indent=2, default=serialize)
91+
json_content = json.dumps(
92+
content, indent=2, ensure_ascii=False, default=serialize
93+
)
9294
except TypeError as e:
9395
raise RuntimeError(f"JSON serialization failed: {e}")
94-
with open(full_path, "w") as f:
96+
with open(full_path, "w", encoding="utf-8") as f:
9597
f.write(json_content)
9698
try:
9799
subprocess.run(["git", "add", str(full_path)], check=True)

0 commit comments

Comments
 (0)