From: Sebastian Dröge Date: Sun, 10 May 2020 08:35:53 +0000 (+0300) Subject: docs: Output JSON files with UTF-8 encoding X-Git-Tag: 1.19.3~877 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0eefad296799abe1ba10805de7e327ecd138760d;p=platform%2Fupstream%2Fgstreamer.git docs: Output JSON files with UTF-8 encoding Otherwise non-ASCII characters are encoded as \uXXXX. Part-of: --- diff --git a/docs/gst-plugins-doc-cache-generator.py b/docs/gst-plugins-doc-cache-generator.py index 11d7d52..596fcad 100755 --- a/docs/gst-plugins-doc-cache-generator.py +++ b/docs/gst-plugins-doc-cache-generator.py @@ -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)