Search code examples
pythonyoutube-dl

How to make youtube-dl support non ASCII characters?


When downloading videos from youtube using youtube-dl everything works as it should except one thing, If the file name contains non english charachters like accented e or arabic charachters etc. they are completed skipped.

Ex: "Stromae - ta fête" would be downloaded with file name "Stromae - ta fte"

Kindly advise what changes should I make to support such charachters in the filename.


Solution

  • Having never used youtube-dl, I can't say for sure, but it may not be youtube-dl that is removing non-ascii characters. You'll notice their documentation has an option for removing non-ascii characters from filenames, though it doesn't appear to be the default:

    https://github.com/rg3/youtube-dl#filesystem-options

    It could be that your operating system doesn't allow non-ascii characters and is removing them. Can you save other files with ascii characters?