0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-19 01:45:13 +00:00

[xattr] Always use UTF-8

On Windows and other systems, other encodings would break when trying to encode non-ASCII characters.
Simply use UTF-8, like every sane system.
This commit is contained in:
Philipp Hagemeister 2014-01-07 06:49:15 +01:00
parent 168da92b9a
commit afc7bc33cb

View file

@ -99,7 +99,7 @@ def write_xattr(path, key, value):
if infoname == "upload_date": if infoname == "upload_date":
value = hyphenate_date(value) value = hyphenate_date(value)
byte_value = value.encode(preferredencoding()) byte_value = value.encode('utf-8')
write_xattr(filename, xattrname, byte_value) write_xattr(filename, xattrname, byte_value)
return True, info return True, info