Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced Characters in Titles under UTF-8 #6068

Closed
effleurager opened this issue Jun 24, 2015 · 3 comments
Closed

Replaced Characters in Titles under UTF-8 #6068

effleurager opened this issue Jun 24, 2015 · 3 comments

Comments

@effleurager
Copy link
Contributor

@effleurager effleurager commented Jun 24, 2015

Downloading videos with, or without a custom title, results in special characters being replaced by underscores; when this video is downloaded (https://www.youtube.com/watch?v=WStm9fBJDnM), the pipe symbol in its title is removed. even though all locale data is listed as UTF-8. Since "--restrict-filenames" is not used, file naming is unusual - files can have special symbols in on my filesystem (ext4)

$ locale

LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
[debug] System config: []
[debug] User config: [u'--add-metadata', u'-o', u'%(upload_date)s - %(title)s.%(ext)s', u'-cf', u'bestvideo[ext=mp4][width<=1920]+bestaudio[ext=m4a]', u'--embed-thumbnail', u'--embed-subs', u'--exec', u'IFS=$n && j={} && k=`expr length $j` && l=`expr $k - 15` && notify-send "YouTube DL" --icon /usr/local/bin/icon.png "`expr substr $j 12 $l`"']
[debug] Command-line args: [u'https://www.youtube.com/watch?v=WStm9fBJDnM', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.06.15
[debug] Python version 2.7.9 - Linux-3.19.0-21-generic-x86_64-with-Ubuntu-15.04-vivid
[debug] exe versions: avconv 11.2-6, avprobe 11.2-6
[debug] Proxy map: {}
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 24, 2015

This is general precaution. Some filesystems does not support characters like | or ? in filename/path, that's why these and some another insane characters are dropped/replaced with underscore. --restrict-filenames is much stricter - it restricts to only ASCII.

@effleurager
Copy link
Contributor Author

@effleurager effleurager commented Jun 27, 2015

As a suggestion, perhaps such behaviour could be disabled via a flag, in a future build?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 27, 2015

Maybe, create a new issue for that.

@dstftw dstftw closed this Jun 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.