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.
Option to allow all characters in filenames on non-Windows OS #22691
Comments
|
I apologize for apparently not doing thorough enough research on the matter. I did search through the tickets on Github to see whether there are any duplicates, but I'm still unsure which one you are referring to. All I could find were errors related to insufficient UTF-8 support (or other character set mismatches), ones with invalid template format strings, and ones complaining that Windows can't handle some character or other, but - seeing the sheer number of tickets in total - it's quite possible I have overlooked more relevant ones. What I'm asking for however is basically the exact opposite: I want a way to just pass the original video title through to the filename, without any "sanitization" whatsoever. I also tried looking through the code and found By simply editing in a hook that prints the parameters and results of I'm now a little confused about what the originally intended behavior was. Can you please clarify this, or point me to the approriate documentation? |
|
Not using Windows does not gives any guarantee one won't use Windows shares/NTFS partitions. |
I absolutely agree on this point, which is why I was asking for an option, instead of changing the default behavior.
In my opinion, this isn't really thought through. The way I see it is, we either want full Windows compatibility, or we want to allow the full character set supported by the current OS.
I do think retaining Windows compatibility by default is the right call to make. I'm only asking for an option to not force Windows' restrictions on my filenames. If you still think such an option is inappropriate for one reason or another, then I will accept that decision and stop bothering you. |
Checklist
Description
On Unix-like operating systems like Linux, the only restrictions on file name characters are "no ASCII
NUL" and "no/". Currently, youtube-dl will always strip out a few characters (e.g.|) that are not allowed on Windows, but that is not necessary on other platforms. When I download a video that has such a character in its name, I have to manually go through the title and replace them back. Please make it an option to not replace these characters in the first place, if the operating system allows them.As Windows is widely used and interoperability between Windows and Linux therefore is a common requirement, I see the current behavior as a sane default. Considering this, this feature could be implemented as counterpart options to
--restrict-filenames. They could be called e.g.--sane-filenamesto explicitly request the current/default behavior and--no-sane-filenamesto allow all characters.