1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-05 04:07:50 +08:00
This commit is contained in:
Jeff Crouse 2013-01-22 00:15:46 -05:00
commit fa4df09346

View File

@ -409,7 +409,10 @@ def encodeFilename(s):
# match Windows 9x series as well. Besides, NT 4 is obsolete.)
return s
else:
return s.encode(sys.getfilesystemencoding(), 'ignore')
encoding = sys.getfilesystemencoding()
if encoding is None:
encoding = 'utf-8'
return s.encode(encoding, 'ignore')
class ExtractorError(Exception):