Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Proposal: A more robust solution for truncating file names #5921
Comments
|
As an addition: it still may not be enough since max filename limitation in general can be arbitrary (see #5908). |
|
Another side note: on Windows file system encoding is not always utf-8, which make thinks more complicated. For example, on Traditional Chinese Windows file system uses big5 (cp950), where each Chinese character occupies 2 bytes rather than 3 bytes in utf-8. |
|
This is still an issue, at least in Windows, and can be further exacerbated depending on the character length of the directory path that youtube-dl is outputting files in. |
|
Also an issue in Linux, and moderator keeps closing new issues on this without referencing or addressing the original issue. |
|
I've got the same error message, add here for reference and seaching |
Currently in this line,
info_dict['title']is truncated to 200 characters. This is first done by @phihag in 0599ef8. This implementation can't handle wide characters correctly. An examples are #5740. I think YoutubeDL should switch to a utf-8 friendly implementation.There's an implementation at a stackoverflow answer, although I haven't tested it. Any opinions?