浏览代码

Use getpreferredencoding() instead of getdefaultlocale()

This fixes issue #7 and is recommended after a bug report I made to the
Python team:

http://bugs.python.org/issue5815
Ricardo Garcia 16 年之前
父节点
当前提交
2f4d18a9f7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube-dl

+ 1 - 1
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({