aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/postprocessor/xattrpp.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-07 06:49:15 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-07 06:49:15 +0100
commitafc7bc33cb8dc63a5e3495e7e11b47f84d89be23 (patch)
tree9778eb4ae98e2926a6859efc94d6925df328754f /youtube_dl/postprocessor/xattrpp.py
parent168da92b9a1509d11fdbe505109b8eff77819602 (diff)
[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.
Diffstat (limited to 'youtube_dl/postprocessor/xattrpp.py')
-rw-r--r--youtube_dl/postprocessor/xattrpp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/postprocessor/xattrpp.py b/youtube_dl/postprocessor/xattrpp.py
index 1cb8ecf1c..4317ba836 100644
--- a/youtube_dl/postprocessor/xattrpp.py
+++ b/youtube_dl/postprocessor/xattrpp.py
@@ -99,7 +99,7 @@ class XAttrMetadataPP(PostProcessor):
if infoname == "upload_date":
value = hyphenate_date(value)
- byte_value = value.encode(preferredencoding())
+ byte_value = value.encode('utf-8')
write_xattr(filename, xattrname, byte_value)
return True, info