aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 50e515a04..94b496dd0 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -73,6 +73,7 @@ def preferredencoding():
def write_json_file(obj, fn):
""" Encode obj as JSON and write it to fn, atomically """
+ fn = encodeFilename(fn)
if sys.version_info < (3, 0):
encoding = get_filesystem_encoding()
# os.path.basename returns a bytes object, but NamedTemporaryFile