diff --git a/youtube-dl b/youtube-dl index 20e26f99c0..bc7e3b5fe9 100755 --- a/youtube-dl +++ b/youtube-dl @@ -1056,7 +1056,7 @@ if __name__ == '__main__': youtube_search_ie = YoutubeSearchIE(youtube_ie) # File downloader - charset = locale.getdefaultlocale()[1] + charset = locale.getpreferredencoding() if charset is None: charset = 'ascii' fd = FileDownloader({