aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-03-03 18:47:54 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-03-03 18:47:54 +0800
commit8ee239e9216f12eae38deb079090b677086e9de1 (patch)
tree365ad6204796f2d75bdf24ba7dfab15eaa91447d /youtube_dl
parent101067de12e193c8ad42e1f474c9018eedadec9d (diff)
[utils] Jython support - handle filenames correctly
Now test:youtube downloads
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 16b4324a4..fc64a4186 100644
--- 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')