Skip to content

Commit 7f7830c

Browse files
specify utf-8 encoding in schema generator
1 parent e17084e commit 7f7830c

File tree

1 file changed

+2
-2
lines changed
  • src/geophires_x_schema_generator

1 file changed

+2
-2
lines changed

src/geophires_x_schema_generator/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def build(json_file_name_prefix: str, generator: GeophiresXSchemaGenerator, rst_
2222
request_schema_json, result_schema_json = generator.generate_json_schema()
2323

2424
request_build_path = Path(build_dir, f'{json_file_name_prefix}request.json')
25-
with open(request_build_path, 'w') as f:
25+
with open(request_build_path, 'w', encoding='utf-8') as f:
2626
print(json.dumps(request_schema_json, indent=2), file=f)
2727
print(f'Wrote request JSON schema file to {request_build_path}.')
2828

2929
if result_schema_json is not None:
3030
result_build_path = Path(build_dir, f'{json_file_name_prefix}result.json')
31-
with open(result_build_path, 'w') as f:
31+
with open(result_build_path, 'w', encoding='utf-8') as f:
3232
print(json.dumps(result_schema_json, indent=2), file=f)
3333
print(f'Wrote result JSON schema file to {result_build_path}.')
3434

0 commit comments

Comments
 (0)