docs: Output JSON files with UTF-8 encoding

Otherwise non-ASCII characters are encoded as \uXXXX.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/474>
This commit is contained in:
Sebastian Dröge 2020-05-10 11:35:53 +03:00
parent 2536cf7c57
commit 0eefad2967

View file

@ -122,9 +122,9 @@ if __name__ == "__main__":
modified = dict_recursive_update(cache, plugins)
with open(output_filename, 'w', newline='\n') as f:
json.dump(cache, f, indent=4, sort_keys=True)
with open(output_filename, 'w', newline='\n', encoding='utf8') as f:
json.dump(cache, f, indent=4, sort_keys=True, ensure_ascii=False)
if modified:
with open(cache_filename, 'w', newline='\n') as f:
json.dump(cache, f, indent=4, sort_keys=True)
with open(cache_filename, 'w', newline='\n', encoding='utf8') as f:
json.dump(cache, f, indent=4, sort_keys=True, ensure_ascii=False)