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

My own LC_ALL error #14807

Closed
adrianTNT opened this issue Nov 20, 2017 · 2 comments
Closed

My own LC_ALL error #14807

adrianTNT opened this issue Nov 20, 2017 · 2 comments

Comments

@adrianTNT
Copy link

@adrianTNT adrianTNT commented Nov 20, 2017

youtube-dl --version
2017.10.15.1

I am getting:

WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.

And I managed to set the LC_ALL variable (a pain to make it persistent), now I see it in the locale command or when tesiting with:

echo $LC_ALL
en_US

Any tips ? I seen it is a common error but couldn't get a clear fix.

 youtube-dl -v
[debug] System config: [u'--prefer-free-formats']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v']
[debug] Encodings: locale ISO-8859-1, fs ISO-8859-1, out ISO-8859-1, pref ISO-8859-1
[debug] youtube-dl version 2017.10.15.1
[debug] Python version 2.7.5 - Linux-3.10.0-693.5.2.el7.x86_64-x86_64-with-centos-7.4.1708-Core
[debug] exe versions: ffmpeg 2.8.13, ffprobe 2.8.13
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

@adrianTNT
Copy link
Author

@adrianTNT adrianTNT commented Nov 20, 2017

I keept getting above error when running youtube-dl with exec() function from PHP.
Testing more I seen I don't get the error in CLI enviroment.
Then I was able to avoid the error by specifying LC_ALL before calling youtube-dl in PHP:

exec("LC_ALL=en_US.UTF-8 youtube-dl --get-title 'https://www.youtube.com/watch?v=Mra-2sxjkIY' 2>&1", $output);

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 20, 2017

LC_ALL must be set to a locale capable of UTF-8.

@dstftw dstftw closed this Nov 20, 2017
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.