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

Chinese characters on title missing #850

Closed
jonomon opened this issue May 22, 2013 · 2 comments
Closed

Chinese characters on title missing #850

jonomon opened this issue May 22, 2013 · 2 comments

Comments

@jonomon
Copy link

@jonomon jonomon commented May 22, 2013

Hello All,

I'm on arch linux and I'm trying to download youtube videos that contains chinese characters in the title.

After running the cmd,
youtube-dl -l --extract-audio --audio-format mp3 http://www.youtube.com/watch?v=w0dMz8RBG7g

I get a filename which looks like: Wanting - (You Exist In My Song) [Trad. Chinese] [Official Music Video]-w0dMz8RBG7g

When I change encodeFilename(s) function in utils.py simply into

def encodeFilename(s):
   .....
    else:
        return s.encode('utf-8')

I get the correct filename.

@phihag
Copy link
Contributor

@phihag phihag commented May 22, 2013

-l has been deprecated for quite a while now (you can just leave it out), but that's not the problem.

I'm a little bit puzzled by the apparent fix - what does sys.getfilesystemencoding() return on your system? On Python 3, that code path should never be hit. Can you include the whole output you get for youtube-dl -v w0dMz8RBG7g ? On my arch linux, everything works fine.

@jonomon
Copy link
Author

@jonomon jonomon commented May 23, 2013

Hello there,

Apparently my system's locale was not set correctly. Once sys.getfilesystemencoding() returned UTF-8, everything was fine.

Thanks

@jonomon jonomon closed this May 23, 2013
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.