projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
168da92
)
[xattr] Always use UTF-8
author
Philipp Hagemeister
<phihag@phihag.de>
Tue, 7 Jan 2014 05:49:15 +0000
(06:49 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Tue, 7 Jan 2014 05:49:15 +0000
(06:49 +0100)
On Windows and other systems, other encodings would break when trying to encode non-ASCII characters.
Simply use UTF-8, like every sane system.
youtube_dl/postprocessor/xattrpp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/postprocessor/xattrpp.py
b/youtube_dl/postprocessor/xattrpp.py
index 1cb8ecf1c89ce8b42b5dab16551ac9418a747b82..4317ba8366622ce7133f1d5234d13b2eb160c998 100644
(file)
--- 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