]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/YoutubeDL.py
[outtmpl] Ensure ASCII in json and add option for Unicode
[yt-dlp.git] / yt_dlp / YoutubeDL.py
index 39df79a3fa9d1b9c6d43d3ad7fcd80d31b3414a0..4e57dffa327501f43aba983a4acbf3bba52f3e4a 100644 (file)
@@ -1249,7 +1249,7 @@ def create_key(outer_mobj):
             elif fmt[-1] == 'j':  # json
                 value, fmt = json.dumps(
                     value, default=_dumpjson_default,
-                    indent=4 if '#' in flags else None, ensure_ascii=False), str_fmt
+                    indent=4 if '#' in flags else None, ensure_ascii='+' not in flags), str_fmt
             elif fmt[-1] == 'h':  # html
                 value, fmt = escapeHTML(str(value)), str_fmt
             elif fmt[-1] == 'q':  # quoted