projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
101067d
)
[utils] Jython support - handle filenames correctly
author
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 3 Mar 2016 10:47:54 +0000
(18:47 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 3 Mar 2016 10:47:54 +0000
(18:47 +0800)
Now test:youtube downloads
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 16b4324a4d1d9c8203b83b9b15e22b793e2b2697..fc64a418670f87306234407e8ead182ae44f1131 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-467,6
+467,10
@@
def encodeFilename(s, for_subprocess=False):
if not for_subprocess and sys.platform == 'win32' and sys.getwindowsversion()[0] >= 5:
return s
+ # Jython assumes filenames are Unicode strings though reported as Python 2.x compatible
+ if sys.platform.startswith('java'):
+ return s
+
return s.encode(get_subprocess_encoding(), 'ignore')